Communication control device, communication control method, and communication control program

The communication control device addresses inaccuracies in in-vehicle packet transmission timing by measuring and correcting frame transmission times based on reception intervals and specified intervals, ensuring precise timing independent of the relay device's clock accuracy.

WO2026140850A1PCT designated stage Publication Date: 2026-07-02AUTONETWORKS TECH LTD +2

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
AUTONETWORKS TECH LTD
Filing Date
2025-12-09
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

Existing in-vehicle communication systems face inaccuracies in determining packet transmission timing due to potential inaccuracies in the clock of the relay device, leading to incorrect determination of packet transmission times.

Method used

A communication control device that measures reception intervals and specified intervals between frame transmissions from multiple in-vehicle devices, determines discrepancies, and sends correction requests to adjust frame transmission times as needed, independent of the relay device's clock accuracy.

Benefits of technology

Accurately determines and corrects frame transmission times across in-vehicle devices, ensuring precise communication timing regardless of the relay device's clock accuracy, thereby enhancing communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025042941_02072026_PF_FP_ABST
    Figure JP2025042941_02072026_PF_FP_ABST
Patent Text Reader

Abstract

This communication control device executes an operation including: measurement processing for measuring a reception interval that is the difference between a first reception time for a frame from a first on-vehicle device and a second reception time for a frame from a second on-vehicle device; acquisition processing for acquiring a prescribed interval that is the difference between a first prescribed time for frame transmission from the first on-vehicle device and a second prescribed time for frame transmission from the second on-vehicle device; first determination processing for determining whether or not to correct a frame transmission time for at least one of the first on-vehicle device and the second on-vehicle device on the basis of comparison between the reception interval and the prescribed interval; and transmission processing for transmitting a request for correcting the frame transmission time to at least one of the first on-vehicle device and the second on-vehicle device for which it has been determined that the frame transmission time is to be corrected.
Need to check novelty before this filing date? Find Prior Art

Description

Communication control device, communication control method, and communication control program

[0001] The present disclosure relates to a communication control device, a communication control method, and a communication control program. This application claims priority based on Japanese Application No. 2024-232530 filed on December 27, 2024, and incorporates all the contents described in the Japanese application.

[0002] Vehicles are equipped with various in-vehicle devices such as a control system ECU (Electronic Control Unit) that controls an engine, a transmission, etc., a body system ECU that controls a headlight, a power window, etc., an information system ECU such as a navigation device and a multimedia device. Each in-vehicle device is connected to an in-vehicle network and can communicate with each other.

[0003] In Patent Document 1, in an in-vehicle system in which an information processing device, which is an in-vehicle device, is connected by an in-vehicle LAN (Local Area Network) using Ethernet (registered trademark) via a relay device, which is an in-vehicle relay device, a technique is disclosed in which the relay device corrects the packet transmission timing by the information processing device. The relay device disclosed in Patent Document 1 receives a packet transmitted from the information processing device, obtains the packet transmission timing by the information processing device by referring to scheduling data, calculates the difference between the obtained transmission timing and the packet reception timing, and when the absolute value of the calculated difference is greater than or equal to a threshold value, transmits a correction request for correcting the subsequent transmission timing by the calculated difference to the information processing device.

[0004] Japanese Unexamined Patent Application Publication No. 2019-047163

[0005] A communication control device according to one aspect of the present disclosure is a communication control device that controls communication in an in-vehicle network to which a plurality of in-vehicle devices are connected, and comprises a processor, the processor performing operations including: a measurement process that measures a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; an acquisition process that acquires a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; a first determination process that determines whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and a transmission process that, if it is determined that the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device should be corrected, transmits a request for correction of the frame transmission time to at least one of the first in-vehicle device and the second in-vehicle device that was determined to have its frame transmission time corrected.

[0006] Figure 1 is a block diagram showing an example of the configuration of an in-vehicle system according to the first embodiment. Figure 2 is a block diagram showing an example of the hardware configuration of a relay ECU according to the first embodiment. Figure 3 is a diagram illustrating the frame transmission cycle. Figure 4 is a diagram showing an example of the configuration of a management table. Figure 5 is a diagram showing an example of a frame transmission schedule table. Figure 6 is a diagram illustrating an abnormality in frame transmission time. Figure 7 is a flowchart showing an example of communication control processing by a relay ECU according to the first embodiment. Figure 8 is a diagram illustrating the correction of frame transmission time according to the first embodiment. Figure 9 is a diagram illustrating an abnormality in frame transmission time. Figure 10 is a block diagram showing an example of the hardware configuration of a relay ECU according to the second embodiment. Figure 11 is a diagram showing an example of a first schedule table for each group. Figure 12 is a diagram illustrating an abnormality in frame transmission time. Figure 13 is a diagram illustrating a specified interval for each group. Figure 14 is a diagram showing an example of a second schedule table. Figure 15 is a flowchart showing an example of initial processing by a relay ECU according to the second embodiment. Figure 16 is a flowchart showing an example of first communication control processing by a relay ECU according to the second embodiment. Figure 17 is a flowchart showing an example of the second communication control process by the relay ECU according to the second embodiment.

[0007] The technology disclosed in Patent Document 1 uses the clock of a relay device to obtain the timing of packet reception. Therefore, if the clock of the relay device is inaccurate, there is a problem in that the correct packet transmission timing will be incorrectly determined to be inaccurate.

[0008] According to this disclosure, it is possible to correctly determine whether the timing of frame transmission from the in-vehicle device is accurate, regardless of the accuracy of the clock in the communication control device.

[0009] The embodiments of this disclosure are outlined below.

[0010] (1) The communication control device according to this embodiment is a communication control device that controls communication in an in-vehicle network to which a plurality of in-vehicle devices are connected, and comprises a processor, the processor performing operations including: a measurement process that measures a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; an acquisition process that acquires a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; a first determination process that determines whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and a transmission process that, if it is determined that the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device should be corrected, transmits a request for correction of the frame transmission time to at least one of the first in-vehicle device and the second in-vehicle device that was determined to have its frame transmission time corrected. This makes it possible to correctly determine whether the transmission time of frames from the in-vehicle device is accurate, regardless of the accuracy of the communication control device's clock.

[0011] (2) In (1) above, the measurement process includes measuring a first reception interval which is the difference between the first reception time and the second reception time, and measuring a second reception interval which is the difference between the second reception time and the third reception time when a frame transmitted from the third in-vehicle device is received; the acquisition process includes acquiring a first specified interval which is the difference between the first specified time and the second specified time, and acquiring a second specified interval which is the difference between the second specified time and the third specified time when frame transmission from the third in-vehicle device is specified; and the first determination process may include determining which of the first in-vehicle device, the second in-vehicle device, and the third in-vehicle device is the target for correction of the frame transmission time based on a comparison between the first reception interval and the first specified interval, and a comparison between the second reception interval and the second specified interval. This makes it possible to determine which of the three in-vehicle devices—the first, second, and third—has an inaccurate frame transmission time, based on the relative intervals between frame reception times from each of the three devices.

[0012] (3) In (1) or (2) above, the acquisition process may include determining a frame transmission schedule that includes the order of frame transmissions of the multiple in-vehicle devices and a specified interval that is the difference between adjacent frame transmission times, based on the frame transmission cycle of the multiple in-vehicle devices and the frame transmission offset, which is the interval from a reference time to a frame transmission time in the frame transmission cycle, and obtaining the specified interval from the frame transmission schedule. This makes it possible to obtain the specified interval of frame transmission times from the frame transmission schedule.

[0013] (4) In any one of (1) to (3) above, the frame transmission period of the first in-vehicle device and the frame transmission period of the second in-vehicle device may be the same. This makes it possible to determine whether or not there is a discrepancy in the frame transmission time between at least one of the two in-vehicle devices having the same frame transmission period.

[0014] (5) In any one of (1) to (3) above, the first frame transmission period of the first in-vehicle device and the second frame transmission period of the second in-vehicle device may be different from each other. This makes it possible to determine whether or not a discrepancy in frame transmission time has occurred in at least one of the two in-vehicle devices whose frame transmission periods are different from each other.

[0015] (6) In (4) above, the in-vehicle system includes a first representative in-vehicle device that transmits a first representative frame at the same first frame transmission cycle as the first in-vehicle device, and the operation further includes a second determination process that determines whether or not to correct the transmission time of the first representative frame based on the interval between a first representative reception time, which is the reception time of the first representative frame, and a reference time, and the transmission process may include sending a request to correct the transmission time of the first representative frame to the first representative in-vehicle device if it is determined that the transmission time of the first representative frame should be corrected. This makes it possible to correct the frame transmission time of the first representative in-vehicle device when there is a discrepancy in the frame transmission times of the first representative in-vehicle device that represents multiple in-vehicle devices that transmit frames at the first frame transmission cycle.

[0016] (7) In (6) above, the in-vehicle system further includes a second representative in-vehicle device that transmits a second representative frame in a second frame transmission cycle different from the first frame transmission cycle, wherein the reference time is a time that repeatedly occurs in each reference cycle which is the least common multiple of the first frame transmission cycle and the second frame transmission cycle, and the second determination process may include determining whether or not to correct the transmission time of the second representative frame based on the interval between the second representative reception time, which is the reception time of the second representative frame, and the reference time. This makes it possible to correct the frame transmission time of the second representative in-vehicle device when there is a discrepancy in the frame transmission time of the second representative in-vehicle device which represents a plurality of in-vehicle devices that transmit frames in the second frame transmission cycle.

[0017] (8) The communication control method according to this embodiment is a communication control method for controlling communication in an in-vehicle network to which a plurality of in-vehicle devices are connected, and includes the steps of: measuring a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; acquiring a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; determining whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and, if it is determined that the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device should be corrected, sending a frame transmission time correction request to at least one of the first in-vehicle device and the second in-vehicle device that was determined to correct the frame transmission time. This makes it possible to correctly determine whether or not the frame transmission time from the in-vehicle device is accurate, regardless of the accuracy of the clock.

[0018] (9) The communication control program according to this embodiment is a communication control program for controlling communication in an in-vehicle network to which a plurality of in-vehicle devices are connected, and causes a computer to perform the following steps: measure a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; acquire a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; determine whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and, if it is determined that the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device should be corrected, send a frame transmission time correction request to at least one of the first in-vehicle device and the second in-vehicle device that was determined to have its frame transmission time corrected. This makes it possible to correctly determine whether the transmission time of frames from the in-vehicle device is accurate, regardless of the accuracy of the communication control device's clock.

[0019] This disclosure can be implemented not only as a relay device having the characteristic configuration described above, a communication control method using characteristic processing in the relay device as a step, and a communication control program that causes the relay device to execute characteristic processing, but also as an in-vehicle system including the relay device, or as part or all of the relay device being implemented as a semiconductor integrated circuit.

[0020] The embodiments of the present invention will be described in detail below with reference to the drawings. At least some of the embodiments described below may be combined in any way.

[0021] [1. First Embodiment] [1-1. In-vehicle System] Figure 1 is a block diagram showing an example of the configuration of an in-vehicle system according to the first embodiment. The in-vehicle system 100 is mounted on a vehicle.

[0022] The in-vehicle system 100 relating to this implementation includes a relay ECU 200 and ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I. The in-vehicle system 100 includes an in-vehicle network consisting of the relay ECU 200, ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I, and communication lines (communication buses) 400A, 400B, and 400C connecting them.

[0023] Multiple ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I are placed in various parts of the vehicle. ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I individually control the hardware of each part of the vehicle or monitor the status of the hardware of each part of the vehicle. For example, ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I are control system, body system, and information system ECUs. ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I are examples of "in-vehicle devices".

[0024] The relay ECU 200 is connected to ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I, respectively, via communication buses 400A, 400B, and 400C. Communication buses 400A, 400B, and 400C are, for example, CAN buses. Specifically, ECUs 310A, 320B, and 320C are connected to communication bus 400A. ECUs 310D, 320E, and 330F are connected to communication bus 400B. ECUs 330G, 310H, and 330I are connected to communication bus 400C. Each of the ECUs 310A, 320B, and 320C connected to communication bus 400A can communicate with each other via communication bus 400A. Each of the ECUs 310D, 320E, and 330F connected to communication bus 400B can communicate with each other via communication bus 400B. Each of the ECUs 330G, 310H, and 330I connected to communication bus 400C can communicate with each other via communication bus 400C.

[0025] Each of the relay ECUs 200 and ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I uses a communication protocol for periodically or aperiodically sending and receiving frames. The communication protocol is, for example, CAN. The communication protocol may be CAN FD (CAN with Flexible Data Rate) or CAN XL. The communication protocol may also be Ethernet. If Ethernet is used, the in-vehicle network may be configured in a star network topology.

[0026] The relay ECU 200 functions as a gateway that relays communication between ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I. The relay ECU 200 relays frames between ECUs connected to different buses. That is, ECUs 310A, 320B, and 320C connected to communication bus 400A, ECUs 310D, 320E, and 330F connected to communication bus 400B, and ECUs 330G, 310H, and 330I connected to communication bus 400C can communicate with each other via the relay ECU 200. In a specific example, the relay ECU 200 can relay frames between ECU 310A connected to bus 400A and ECU 310D connected to bus 400B, between ECU 320E connected to bus 400B and ECU 330G connected to bus 400C, and between ECU 320B connected to bus 400A and ECU 310H connected to bus 400C. Hereinafter, ECUs 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, and 330I will be collectively referred to as "ECU 310, 320, and 330."

[0027] [1-2. Hardware Configuration of the Relay ECU] Figure 2 is a block diagram showing an example of the hardware configuration of the relay ECU according to the first embodiment. The relay ECU 200 includes a processor 201, a non-volatile memory 202, a volatile memory 203, and communication interfaces (hereinafter also referred to as "communication I / F") 204A, 204B, and 204C. The relay ECU 200 is an example of a "communication control device". The processor 201, the non-volatile memory 202, the volatile memory 203, and the communication I / F 204A, 204B, and 204C are each connected to a data bus 205.

[0028] The volatile memory 203 is a semiconductor memory such as SRAM (Static Random Access Memory) or DRAM (Dynamic Random Access Memory). The non-volatile memory 202 is a flash memory, hard disk, ROM (Read Only Memory), etc. The non-volatile memory 202 stores the communication control program 210, which is a computer program, and the data used to execute the communication control program 210. The functions of the relay ECU 200, which will be described later, are performed when the communication control program 210 is executed by the processor 201.

[0029] The processor 201 is, for example, a CPU (Central Processing Unit). However, the processor 201 is not limited to a CPU. The processor 201 may also be a GPU (Graphics Processing Unit). In a specific example, the processor 201 is a multi-core processor. The processor 201 may also be a single-core processor. The processor 201 is configured to execute computer programs. However, the processor 201 may also be, for example, an ASIC (Application Specific Integrated Circuit), or programmable hardware such as an FPGA (Field Programmable Gate Array) or a CPLD (Complex Programmable Logic Device). In this case, the ASIC or programmable hardware is configured to execute the same functions as the communication control program 210.

[0030] Communication interfaces 204A, 204B, and 204C are communication interfaces that conform to the communication protocols described above. Communication interfaces 204A, 204B, and 204C are, for example, CAN interfaces.

[0031] Communication I / F 204A is connected to bus 400A. Communication I / F 204B is connected to bus 400B. Communication I / F 204C is connected to bus 400C. Relay ECU 200 can communicate with ECUs 310A, 320B, and 320C via communication I / F 204A. Relay ECU 200 can communicate with ECUs 310D, 320E, and 330F via communication I / F 204B. Relay ECU 200 can communicate with ECUs 330G, 310H, and 330I via communication I / F 204C.

[0032] The non-volatile memory 202 stores the management table 220. The management table 220 is used by the communication control program 210. The management table 220 will be described later.

[0033] [1-3. Frame Transmission]

[0034] Each of the ECUs 310A, 310D, and 310H transmits a frame at the same period. Each of the ECUs 320B, 320C, and 320E transmits a frame at the same period. Each of the ECUs 330F, 330G, and 330I transmits a frame at the same period. The frame transmission period for ECUs 310A, 310D, and 310H is, for example, 50 ms, the frame transmission period for ECUs 320B, 320C, and 320E is, for example, 100 ms, and the frame transmission period for ECUs 330F, 330G, and 330I is, for example, 150 ms.

[0035] Figure 3 is a diagram illustrating the transmission period of a frame. The transmission period P_T of a frame is defined by periodically occurring reference times t0, t1, t2, t3, ... These reference times t0, t1, t2, t3, ... repeat at regular time intervals. One transmission period P_T is the period from one reference time (e.g., t0) to the next reference time (e.g., t1).

[0036] Each of the ECUs 310, 320, and 330 has an offset OF set individually for frame transmission. The offset OF is the period from the reference time t0, t1, t2, t3, ... to the time when ECUs 310 and 320 transmit a frame (hereinafter also referred to as the "frame transmission time") tr. The offset OF is a period shorter than one transmission cycle P_T. The offset OFs of each ECU 310, 320, and 330 are set so that multiple frame transmissions are not concentrated in a short period but are distributed within the frame transmission cycle.

[0037] Figure 4 shows an example of the configuration of the management table. Figure 4 shows an example of the offset settings for ECUs 310, 320, and 330. In the example in Figure 4, the offset for ECU 310A is set to "2ms", the offset for ECU 320B is set to "20ms", the offset for ECU 320C is set to "22ms", the offset for ECU 310D is set to "4ms", the offset for ECU 320E is set to "24ms", the offset for ECU 330F is set to "30ms", the offset for ECU 330G is set to "32ms", the offset for ECU 310H is set to "6ms", and the offset for ECU 330I is set to "34ms".

[0038] [1-4. Functions of the Relay ECU] Returning to Figure 2, the communication control program 210 includes multiple codes that can be executed by the processor 201. The processor 201 executes the relay process 211, the measurement process 212, the acquisition process 213, the determination process 214, and the transmission process 215 based on the communication control program 210.

[0039] The relay process 211 is the process of relaying frames between buses 400A, 400B, and 400C. Each of the ECUs 310, 320, and 330 is individually assigned a CAN ID, which is identification information. In the relay process 211, when the relay ECU 200 receives a frame transmitted from an ECU connected to the first bus of buses 400A, 400B, and 400C (the relay source ECU), it refers to the CAN ID stored in the frame. The relay ECU 200 determines the destination ECU (the relay destination ECU) from the CAN ID and transmits the frame to the second bus of buses 400A, 400B, and 400C to which the determined destination ECU is connected.

[0040] The measurement process 212 is a process that measures the reception interval, which is the difference between the first reception time when a frame transmitted from the first ECU is received and the second reception time when a frame transmitted from the second ECU is received. In the in-vehicle system 100, frames are transmitted one after another from ECUs 310, 320, and 330. The relay ECU 200 sequentially receives the frames transmitted from ECUs 310, 320, and 330 and measures the reception interval of adjacent frames in the reception order.

[0041] Referring to Figure 4, the transmission period of ECUs 310A, 310D, and 310H is 50 ms. The offset of ECU 310A is 2 ms, the offset of ECU 310D is 4 ms, and the offset of ECU 310H is 6 ms. For example, if ECUs 310A, 310D, and 310H transmit frames at the correct transmission timing, ECU 310A will transmit a frame, 2 ms later ECU 310D will transmit a frame, and 2 ms later ECU 310H will transmit a frame. The relay ECU 200 measures the reception interval (2 ms), which is the difference between the reception time of the frame from ECU 310A and the reception time of the frame from ECU 310D, and measures the reception interval (2 ms), which is the difference between the reception time of the frame from ECU 310D and the reception time of the frame from ECU 310H.

[0042] Returning to Figure 2, acquisition process 213 is the process of acquiring a specified interval, which is the difference between the first specified time when frame transmission from the first ECU is specified and the second specified time when frame transmission from the second ECU is specified. The specified time for frame transmission is the scheduled time for frame transmission, and is the time after an offset has elapsed from the start time of the frame transmission cycle (reference time). In the example in Figure 4, the specified time for frame transmission of ECU 310A is 2 ms after the reference time, the specified time for frame transmission of ECU 310D is 4 ms after the reference time, and the specified time for frame transmission of ECU 310H is 6 ms after the reference time. Therefore, the specified interval for frame transmission between ECU 310A and ECU 310D is 2 ms, and the specified interval for frame transmission between ECU 310D and ECU 310H is 2 ms.

[0043] In the acquisition process 213, the relay ECU 200 determines a frame transmission schedule based on the management table 220. The frame transmission schedule includes the order of frame transmission and a prescribed interval.

[0044] In the first embodiment, the relay ECU 200 creates a frame transmission schedule table. FIG. 5 is a diagram showing an example of the frame transmission schedule table. The frame transmission schedule table includes the order of frame transmission, a CAN ID, a prescribed time, and a prescribed interval.

[0045] FIG. 5 shows a frame transmission schedule table created from the management table 220 shown in FIG. 4. The transmission cycles of the ECUs 310, 320, and 330 start simultaneously. That is, from one reference time, the 50-ms transmission cycles (hereinafter also referred to as "transmission cycle A") of the ECUs 310A, 310D, and 310H, the 100-ms transmission cycles (hereinafter also referred to as "transmission cycle B") of the ECUs 320B, 320C, and 320E, and the transmission cycles (hereinafter also referred to as "transmission cycle C") of the ECUs 330F, 330G, and 330I start.

[0046] The frame transmission order "1" is the ECU 310A (CAN ID: 0x100), and the prescribed time is "2 ms". The frame transmission order "2" is the ECU 310D (CAN ID: 0x101), the prescribed time is "4 ms", and the prescribed interval (that is, the elapsed time from the prescribed time of the previous ECU 310A) is "2 ms". The frame transmission order "3" is the ECU 310H (CAN ID: 0x102), the prescribed time is "6 ms", and the prescribed interval (that is, the elapsed time from the prescribed time of the previous ECU 31OD) is "2 ms".

[0047] Frame transmission order "4" is ECU320B (CAN ID: 0x200), the specified time is "20 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU310H) is "14 ms". Frame transmission order "5" is ECU320C (CAN ID: 0x201), the specified time is "22 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU320B) is "2 ms". Frame transmission order "6" is ECU320E (CAN ID: 0x202), the specified time is "24 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU320C) is "2 ms".

[0048] Frame transmission order "7" is ECU330F (CAN ID: 0x300), the specified time is "30 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU320E) is "6 ms". Frame transmission order "8" is ECU330G (CAN ID: 0x301), the specified time is "32 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU330F) is "2 ms". Frame transmission order "9" is ECU330I (CAN ID: 0x302), the specified time is "34 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU330G) is "2 ms".

[0049] Frame transmission order "10" is ECU310A (CAN ID: 0x100), the specified time is "52 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU330I) is "18 ms". Frame transmission order "11" is ECU310D (CAN ID: 0x101), the specified time is "54 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU310A) is "2 ms". Frame transmission order "12" is ECU310H (CAN ID: 0x102), the specified time is "56 ms", and the specified interval (that is, the elapsed time from the specified time of the previous ECU310D) is "2 ms".

[0050] Frame transmission sequence "13" is ECU310A (CAN ID: 0x100), with a specified time of "102 ms" and a specified interval (i.e., elapsed time since the specified time of the previous ECU310H) of "46 ms". Frame transmission sequence "14" is ECU310D (CAN ID: 0x101), with a specified time of "104 ms" and a specified interval (i.e., elapsed time since the specified time of the previous ECU310A) of "2 ms". Frame transmission sequence "15" is ECU310H (CAN ID: 0x102), with a specified time of "106 ms" and a specified interval (i.e., elapsed time since the specified time of the previous ECU310D) of "2 ms".

[0051] In this embodiment, transmission period A is 50 ms, transmission period B is 100 ms, and transmission period C is 150 ms. The least common multiple of transmission periods A, B, and C is 300 ms, and the frame transmission schedule of ECUs 310, 320, and 330 is repeated with 300 ms as one period (hereinafter also referred to as the "common period"). Therefore, the frame transmission schedule table only needs to specify the frame transmission schedule from the start time (a common reference time for transmission periods A, B, and C; hereinafter also referred to as the "common reference time") up to 300 ms, which is the least common multiple of transmission periods A, B, and C (i.e., the frame transmission schedule for one common period).

[0052] Returning to Figure 2, in acquisition process 213, the relay ECU 200 obtains the specified time from the created frame transmission schedule table.

[0053] The determination process 214 is a process that determines whether or not to correct the frame transmission time of at least one of the first ECU and the second ECU based on a comparison between the reception interval measured in the measurement process 212 and the specified interval acquired in the acquisition process 213. In a specific example, the relay ECU 200 determines in the determination process 214 whether or not to correct the frame transmission time of the second ECU, which transmitted a frame after the first ECU.

[0054] Specifically, the relay ECU 200 calculates the absolute value of the difference between the reception interval and the corresponding specified interval (hereinafter also referred to as the "evaluation value"), and compares the evaluation value with a threshold. If the frame transmission time of either the first ECU, which transmitted the frame first, or the second ECU, which transmitted the frame later, deviates from the specified time by more than the allowable range, the evaluation value exceeds the threshold. Hereinafter, if the frame transmission time does not deviate from the specified time by more than the allowable range, it is said that the frame transmission time is normal, and if the frame transmission time deviates from the specified time by more than the allowable range, it is said that the frame transmission time is abnormal.

[0055] Figure 6 illustrates the abnormality in frame transmission time. When the frame transmission times of ECUs 310A, 310D, 310H, and 320B are normal, ECU 310A transmits a frame 2 ms after the reference time, ECU 310D transmits a frame 4 ms after the reference time, ECU 310H transmits a frame 6 ms after the reference time, and ECU 320B transmits a frame 20 ms after the reference time. The frame transmission time interval between ECU 310A and ECU 310D is 2 ms, the frame transmission time interval between ECU 310D and ECU 310H is 2 ms, and the frame transmission time interval between ECU 310H and ECU 320B is 14 ms.

[0056] Let's consider the case (Case 1) where the frame transmission time of ECU310D (reception time at relay ECU200) is abnormal. If the frame transmission time of ECU310D is 1 ms later than the specified time, ECU310D will transmit the frame 5 ms after the reference time. In this case, the frame transmission time interval between ECU310A and ECU310D will be 3 ms. The frame transmission time interval between ECU310D and ECU310H will be 1 ms. The frame transmission time interval between ECU310H and ECU320B will be 14 ms.

[0057] In the above case, the frame transmission time interval between ECU 310A and ECU 310D is 3 ms. In the first embodiment, the relay ECU 200 determines whether the frame transmission time of ECU 310D is normal or abnormal by comparing the frame reception interval between ECU 310A and ECU 310D with a predetermined interval.

[0058] Specifically, the relay ECU 200 compares the evaluated frame transmission time between ECU 310A and ECU 310D with a threshold value. If the evaluated value exceeds the threshold value, the relay ECU 200 determines that the frame transmission time of ECU 310D is abnormal.

[0059] In the determination process 214, the relay ECU 200 determines that it will correct the frame transmission time of an ECU whose frame transmission time is abnormal. That is, the relay ECU 200 determines that an ECU whose frame transmission time is abnormal is subject to frame transmission time correction. For example, the relay ECU 200 determines that an ECU is subject to frame transmission time correction if it is determined that the frame transmission time of the same ECU is abnormal for a predetermined number of consecutive times. This makes it possible to eliminate frame transmission time discrepancies caused by sudden or accidental reasons and to accurately determine which ECUs are subject to frame transmission time correction.

[0060] Returning to Figure 2, the transmission process 215 is the process of sending a frame transmission time correction request to the ECU that has been determined to be subject to frame transmission time correction. The relay ECU 200 sends the correction request frame to the ECU whose frame transmission time is subject to correction.

[0061] The correction request frame includes the CAN ID of the ECU to be corrected and the correction time. For example, if ECU 310D, whose frame transmission time is 1 ms later than the specified time, is the target of correction, the correction request frame will include the CAN ID "0x101" and the correction time "-1". For example, if ECU 310H, whose frame transmission time is 1 ms earlier than the specified time, is the target of correction, the correction request frame will include the CAN ID "0x102" and the correction time "+1". Here, a positive correction time indicates a correction request to delay the frame transmission time, and a negative correction time indicates a correction request to advance the frame transmission time.

[0062] The CAN ID is not only an identification information for the ECU, but also an identification information for the type of data contained in the frame. For example, if one ECU transmits multiple types of data, multiple CAN IDs may be assigned to that ECU. In this case, by specifying the CAN ID of the frame to be corrected in the correction request frame, it is possible to specify the correction target for each type of data transmitted from a single ECU.

[0063] When an ECU to be corrected receives a correction request frame, it corrects the frame transmission time by the specified correction time. For example, if ECU 310D receives a correction request frame with a correction time of "-1", ECU 310D advances the frame transmission time by 1 ms. For example, if ECU 310H receives a correction request frame with a correction time of "+1", ECU 310H delays the frame transmission time by 1 ms.

[0064] [1-5. Operation of the Relay ECU] The operation of the relay ECU 200 according to the first embodiment will be described below. Figure 7 is a flowchart showing an example of communication control processing by the relay ECU according to the first embodiment.

[0065] The processor 201 uses the management table 220 to create a frame transmission schedule table (step S101).

[0066] The processor 201 sets the variable i, which indicates the transmission order of the frames, to its initial value of "1" (step S102). However, i is a natural number variable.

[0067] When the i-th frame is transmitted from the ECU, the processor 201 relays the frame (step S103). That is, the processor 201 refers to the CAN ID of the frame received from one bus (first bus) and determines the destination ECU. The processor 201 then transmits the frame to the bus to which the destination ECU is connected (second bus).

[0068] The processor 201 measures the reception interval, which is the difference between the reception time of the frame relayed this time and the reception time of the frame relayed last time (step S104). That is, the reception interval is the time from when the (i-1)th frame is received until when the (i)th frame is received. However, when i=1, it is not the (i-1)th frame, but the last frame in the frame transmission order in the frame transmission schedule table (hereinafter referred to as the Nth frame).

[0069] The processor 201 obtains a specified interval from the frame transmission schedule table, which is the difference between the specified transmission time of the frame currently relayed and the specified transmission time of the frame previously relayed (step S105). That is, the specified interval is the time from the specified transmission time of the (i-1)th frame to the specified transmission time of the (i)th frame. However, if i=1, it is the Nth frame, not the (i-1)th frame.

[0070] The processor 201 calculates an evaluation value F(i), which is the absolute value of the difference between the reception interval and the specified interval (step S106).

[0071] The processor 201 determines whether the evaluation value F(i) is less than or equal to the threshold Th (step S107). However, Th is a fixed real number. If the evaluation value F(i) is less than or equal to the threshold Th (YES in step S107), the processor 201 determines that the transmission time of the i-th frame is normal. If the evaluation value F(i) is greater than the threshold Th (NO in step S107), the processor 201 determines that the transmission time of the i-th frame is abnormal.

[0072] If the evaluation value F(i) is less than or equal to the threshold Th and the transmission time of the i-th frame is normal (YES in step S107), the processor 201 does not send a correction request frame. The processor 201 sets the variable cnt(i), which indicates the number of consecutive times the transmission time of the i-th frame has been determined to be abnormal, to "0" (step S108). However, cnt(i) is a variable that can be 0 or a natural number.

[0073] If the evaluation value F(i) is greater than the threshold Th and the transmission time of the i-th frame is abnormal (NO in step S107), the processor 201 increments cnt(i) (step S109).

[0074] The processor 201 determines whether cnt(i) has reached a specified value n (step S110). The specified value n is, for example, "5". If cnt(i) has not reached the specified value n (NO in step S110), the processor 201 proceeds to step S114.

[0075] If cnt(i) reaches a specified value n (YES in step S110), the processor 201 calculates the correction time (step S111). The correction time is the difference between the reception interval and the specified interval. The processor 201 creates a correction request frame containing the CAN ID of the ECU that sent the i-th frame and the calculated correction time, and sends the created correction request frame (step S112). Furthermore, the processor 201 resets cnt(i) to "0" (step S113).

[0076] The processor 201 determines whether i = N, that is, whether the last transmission order in the frame transmission schedule table has been reached (step S114).

[0077] If i is not N (NO in step S114), the processor 201 increments i (step S115) and returns to step S103.

[0078] If i = N (YES in step S114), the processor 201 returns to step S102.

[0079] [1-6. Modified Examples] [1-6-1. First Modified Example] Figure 8 is a diagram illustrating the correction of frame transmission time according to the first embodiment. Consider the case where ECU 310A transmits a frame at time tr1, 2 ms after the reference time; ECU 310D transmits a frame at time tr2, 5 ms after the reference time; ECU 310H transmits a frame at time tr3, 6 ms after the reference time; and ECU 320B transmits a frame at time tr4, 20 ms after the reference time.

[0080] Since the offset of ECU310D is 4ms, the frame transmission time tr2 of ECU310D is 1ms later than the specified time. The frame transmission times of ECU310A, 310H, and 320B are normal.

[0081] The specified frame transmission interval between ECU310A and ECU310D is 2 ms, and the frame reception interval between ECU310A and ECU310D is 3 ms. Therefore, the evaluation value is "1", and if the threshold Th is, for example, "0.5", the frame transmission time tr2 of ECU310D is determined to be abnormal. The correction time is "-1", and the frame transmission time tr2 of ECU310D is corrected to tr2'.

[0082] On the other hand, the specified frame transmission interval between ECU310D and ECU310H is 2 ms, and the frame reception interval between ECU310D and ECU310H is 1 ms. Therefore, the evaluation value is "1", and if the threshold Th is, for example, "0.5", the frame transmission time of ECU310H is determined to be abnormal. The correction time is "+1", and the frame transmission time tr3 of ECU310H is corrected to tr3'.

[0083] As described above, the normal frame transmission time tr3 of ECU310H is corrected. To prevent such unnecessary corrections, if the transmission time of the i-th frame is corrected, even if the transmission time of the (i+1)th frame is determined to be abnormal, the transmission time of the (i+1)th frame does not need to be corrected.

[0084] [1-6-2. Second Modification] Figure 9 is a diagram illustrating an anomaly in frame transmission time. The upper diagram in Figure 9 shows the first case described above. In the first case, the frame transmission time of ECU 310D is 1 ms later than the specified time, and U310D transmits the frame 5 ms after the reference time. At this time, the frame transmission time interval between ECU 310A and ECU 310D is 3 ms, and the frame transmission time interval between ECU 310D and ECU 310H is 1 ms. The frame transmission time interval between ECU 310H and ECU 320B is 14 ms.

[0085] Let's consider the case (second case) where the frame transmission time of ECU310H (reception time at relay ECU200) is abnormal. The lower diagram in Figure 9 shows the second case. If the frame transmission time of ECU310H is 1 ms earlier than the specified time, ECU310H will transmit the frame 5 ms after the reference time. In this case, the frame transmission time interval between ECU310A and ECU310D is 2 ms. The frame transmission time interval between ECU310D and ECU310H is 1 ms. The frame transmission time interval between ECU310H and ECU320B is 15 ms.

[0086] In both the first and second cases, the frame transmission time interval between ECU 310D and ECU 310H is 1 ms. Therefore, simply comparing the frame reception interval between ECU 310D and ECU 310H with a specified interval does not allow for the identification of whether an abnormality in frame transmission time has occurred in either ECU 310D or ECU 310H. Thus, in the second modified example, the relay ECU 200 determines whether the frame transmission time of ECU 310D is normal or abnormal by comparing the frame reception interval between ECU 310A and ECU 310D with a specified interval, and by comparing the frame reception interval between ECU 310D and ECU 310H with a specified interval. It also determines whether the frame transmission time of ECU 310H is normal or abnormal by comparing the frame reception interval between ECU 310D and ECU 310H with a specified interval, and by comparing the frame reception interval between ECU 310H and ECU 320B with a specified interval.

[0087] Specifically, the relay ECU 200 compares a first evaluation value of the frame transmission time between ECU 310A and ECU 310D with a threshold value, and compares a second evaluation value of the frame transmission time between ECU 310A and ECU 310D with a threshold value. If both the first evaluation value and the second evaluation value exceed the threshold, the relay ECU 200 determines that the frame transmission time of ECU 310D, which is related to both the first and second evaluation values, is abnormal. In the first case, as a result of ECU 310D's frame transmission time being 1 ms later than the specified time, the frame transmission time interval of 3 ms between ECU 310A and ECU 310D is greater than the specified interval of 2 ms, and the frame transmission time interval of 1 ms between ECU 310D and ECU 310H is less than the specified interval of 2 ms. Therefore, the above determination process can correctly determine that the frame transmission time of ECU 310D is abnormal.

[0088] The relay ECU 200 compares a first evaluation value of the frame transmission time between ECU 310D and ECU 310H with a threshold, and compares a second evaluation value of the frame transmission time between ECU 310H and ECU 320B with a threshold. If both the first evaluation value and the second evaluation value exceed the threshold, the relay ECU 200 determines that the frame transmission time of ECU 310H, which is related to both the first and second evaluation values, is abnormal. In the second case, the frame transmission time of ECU 310H is 1 ms earlier than the specified time, resulting in a frame transmission time interval of 3 ms between ECU 310D and ECU 310H being greater than the specified interval of 2 ms, and a frame transmission time interval of 15 ms between ECU 310H and ECU 320B being less than the specified interval of 16 ms. Therefore, the above determination process can correctly determine that the frame transmission time of ECU 310H is abnormal.

[0089] [2. Second Embodiment] [2-1. Function of the Relay ECU] Figure 10 is a block diagram showing an example of the hardware configuration of the relay ECU according to the second embodiment. The hardware configuration of the relay ECU 200 according to the second embodiment is the same as that of the relay ECU 200 according to the first embodiment, except for the communication control program 210, so the explanation is omitted.

[0090] The communication control program 210 includes multiple codes that can be executed by the processor 201. The processor 201 executes relay processing 231, first measurement processing 232, first acquisition processing 233, first determination processing 234, second measurement processing 235, second acquisition processing 236, second determination processing 237, and transmission processing 238 based on the communication control program 210.

[0091] The relay process 231 is the same as the relay process 211 according to the first embodiment.

[0092] In the second embodiment, ECUs 310, 320, and 330 are grouped by frame transmission period. For example, ECUs 310A, 310D, and 310H, which have a frame transmission period of 50 ms, constitute group A. ECUs 320B, 320C, and 320E, which have a frame transmission period of 100 ms, constitute group B. ECUs 330F, 330G, and 330I, which have a frame transmission period of 150 ms, constitute group C.

[0093] In each group, one ECU acts as the representative ECU. For example, the representative ECU for Group A is ECU310D, the representative ECU for Group B is ECU320C, and the representative ECU for Group C is ECU330G. Hereafter, the frame transmitted by the representative ECU will also be referred to as the "representative frame."

[0094] The first measurement process 232 measures the reception interval, which is the difference between the first reception time when a frame transmitted from the first ECU is received and the second reception time when a frame transmitted from the second ECU, which has the same frame transmission period as the first ECU, is received. In other words, the first measurement process 232 measures the frame reception interval between ECUs in the same group.

[0095] The first acquisition process 233 is a process that acquires a specified interval, which is the difference between the first specified time when frame transmission from the first ECU is specified and the second specified time when frame transmission from the second ECU, which has the same frame transmission period as the first ECU, is specified. In other words, the first acquisition process 233 acquires the specified frame interval between ECUs in the same group.

[0096] In the first acquisition process 233, the relay ECU 200 determines the frame transmission schedule for each group based on the management table 220.

[0097] In the second embodiment, the relay ECU 200 creates a first schedule table for each group that shows the frame transmission schedule. Figure 11 shows an example of the first schedule table for each group. In the example in Figure 11, the first schedule table 500A for group A, the first schedule table 500B for group B, and the first schedule table 500C for group C are shown.

[0098] Each of the first schedule tables 500A, 500B, and 500C includes the transmission order, the CAN ID, and the specified interval.

[0099] In the first schedule table 500A, transmission order "1" is associated with the CAN ID "0x100" of ECU 310A and the specified interval "46ms". The specified interval of 46ms is the interval between the specified time of frame transmission by ECU 310H, which transmitted the frame immediately before (at the end of the previous cycle), and the specified time of frame transmission by ECU 310A. Furthermore, in the first schedule table 500A, transmission order "2" is associated with the CAN ID "0x101" of ECU 310D and the specified interval "2ms". The specified interval of 2ms is the interval between the specified time of frame transmission by ECU 310A, which transmitted the frame immediately before, and the specified time of frame transmission by ECU 310D. Furthermore, in the first schedule table 500A, the transmission order "3" is associated with the CAN ID "0x102" of ECU 310H and the specified interval "2ms". The specified interval of 2ms is the interval between the specified time of frame transmission by ECU 310D, which transmitted the frame immediately before, and the specified time of frame transmission by ECU 310H.

[0100] In the first schedule table 500B, transmission order "1" is associated with the CAN ID "0x200" of ECU320B and the specified interval "96ms". The specified interval of 96ms is the interval between the specified time of frame transmission by ECU320E, which transmitted the frame immediately before (at the end of the previous cycle), and the specified time of frame transmission by ECU320B. Furthermore, in the first schedule table 500B, transmission order "2" is associated with the CAN ID "0x201" of ECU320C and the specified interval "2ms". The specified interval of 2ms is the interval between the specified time of frame transmission by ECU320B, which transmitted the frame immediately before, and the specified time of frame transmission by ECU320C. Furthermore, in the first schedule table 500B, the transmission order "3" is associated with the CAN ID "0x202" of ECU320E and the specified interval "2ms". The specified interval of 2ms is the interval between the specified time of frame transmission by ECU320C, which transmitted the frame immediately before, and the specified time of frame transmission by ECU320E.

[0101] In the first schedule table 500C, transmission order "1" is associated with the CAN ID "0x300" of ECU330F and the specified interval "146ms". The specified interval of 146ms is the interval between the specified time of frame transmission by ECU330I, which transmitted the frame immediately before (at the end of the previous cycle), and the specified time of frame transmission by ECU330F. Furthermore, in the first schedule table 500C, transmission order "2" is associated with the CAN ID "0x301" of ECU330G and the specified interval "2ms". The specified interval of 2ms is the interval between the specified time of frame transmission by ECU330F, which transmitted the frame immediately before, and the specified time of frame transmission by ECU330G. Furthermore, in the first schedule table 500C, the transmission order "3" is associated with the CAN ID "0x302" of ECU330I and the specified interval "2ms". The specified interval of 2ms is the interval between the specified time of frame transmission by ECU330G, which transmitted the frame immediately before, and the specified time of frame transmission by ECU330I.

[0102] Returning to Figure 10, in the first acquisition process 233, the relay ECU 200 obtains a specified time from the created first schedule tables 500A, 500B, and 500C. Specifically, the relay ECU 200 obtains a specified time corresponding to the CAN ID stored in the received frame from the first schedule table of the group to which the ECU that sent the received frame belongs.

[0103] The first determination process 234 is a process that determines whether or not to correct the frame transmission time of at least one of the first ECU and the second ECU, based on a comparison between the reception interval measured in the first measurement process 232 and the specified interval acquired in the first acquisition process 233. In a specific example, the relay ECU 200 determines in the first determination process 234 whether or not to correct the frame transmission time of the second ECU, which transmitted a frame after the first ECU.

[0104] Specifically, the relay ECU 200 calculates an evaluation value, which is the absolute value of the difference between the reception interval and the corresponding specified interval, and compares the evaluation value with a threshold. If the frame transmission time of either the first ECU, which transmitted the frame first, or the second ECU, which transmitted the frame later, deviates from the specified time by more than the allowable range, the evaluation value exceeds the threshold.

[0105] Figure 12 is a diagram illustrating the abnormality in frame transmission time. When the frame transmission times of ECUs 310A, 310D, and 310H are normal, the specified interval for frame transmission time between ECU 310A and ECU 310D is 2 ms, the specified interval for frame transmission time between ECU 310D and ECU 310H is 2 ms, and the specified interval for frame transmission time between ECU 310H and ECU 310A is 46 ms.

[0106] Let's consider the case where the frame transmission time of ECU310H (reception time at relay ECU200) is abnormal. If the frame transmission time of ECU310H is 1 ms later than the specified time, the frame transmission time interval between ECU310D and ECU310H will be 3 ms, and the frame transmission time interval between ECU310H and ECU310A will be 45 ms.

[0107] In the second embodiment, the relay ECU 200 determines whether the frame transmission time of ECU 310H is normal or abnormal by comparing the frame reception interval between ECU 310D and ECU 310H with a predetermined interval.

[0108] Specifically, the relay ECU 200 compares the evaluation value of the frame transmission time between ECU 310D and ECU 310H with a threshold. If the evaluation value exceeds the threshold, the relay ECU 200 determines that the frame transmission time of ECU 310H is abnormal.

[0109] In the first determination process 234, the relay ECU 200 determines that it will correct the frame transmission time of an ECU whose frame transmission time is abnormal. That is, the relay ECU 200 determines that an ECU whose frame transmission time is abnormal is subject to frame transmission time correction. For example, the relay ECU 200 determines that an ECU is subject to frame transmission time correction if it has been determined that the frame transmission time of the same ECU is abnormal for a specified number of consecutive times. This makes it possible to eliminate frame transmission time discrepancies caused by sudden or accidental reasons and to accurately determine which ECUs are subject to frame transmission time correction.

[0110] Returning to Figure 10, the transmission process 238 is the process of sending a frame transmission time correction request to the ECU that has been determined to be subject to frame transmission time correction. The relay ECU 200 sends the correction request frame to the ECU whose frame transmission time is subject to correction. The correction request frame is the same as the correction request frame described in the first embodiment, so its explanation is omitted.

[0111] The second measurement process 235 measures the interval between the reception time of the first representative frame transmitted from the first representative ECU, which transmits frames at the first frame transmission cycle, and the reference time. Furthermore, the second measurement process 235 measures the interval between the reception time of the second representative frame transmitted from the second representative ECU, which transmits frames at a second frame transmission cycle different from the first frame transmission cycle, and the reference time.

[0112] The above reference time is the time that repeatedly occurs with each reference period, which is the least common multiple of the first frame transmission period and the second frame transmission period. In the second embodiment, the frame transmission period of group A is 50 ms, the frame transmission period of group B is 100 ms, and the frame transmission period of group C is 150 ms. The least common multiple of the frame transmission periods is 300 ms, and this 300 ms is the reference period. Hereinafter, the reference time that repeatedly occurs with each reference period will also be called the "common reference time". The common reference time is the reference time common to group A, group B, and group C.

[0113] Specifically, the relay ECU 200 measures the reception interval, which is the difference between the reception time of a frame (representative frame) transmitted from ECU 310D, the representative ECU of Group A, and the common reference time. The relay ECU 200 measures the reception interval, which is the difference between the reception time of a frame (representative frame) transmitted from ECU 320C, the representative ECU of Group B, and the common reference time. The relay ECU 200 measures the reception interval, which is the difference between the reception time of a frame (representative frame) transmitted from ECU 330G, the representative ECU of Group C, and the common reference time.

[0114] The second acquisition process 236 is a process that acquires a specified interval, which is the interval between the specified time when the first representative frame is transmitted from the first representative ECU and the common reference time. Furthermore, the second acquisition process 236 acquires a specified interval, which is the interval between the specified time when the second representative frame is transmitted from the second representative ECU and the common reference time.

[0115] Specifically, the relay ECU 200 acquires a specified interval, which is the difference between the specified time when a frame (representative frame) is transmitted from ECU 310D, the representative ECU of Group A, and the common reference time. The relay ECU 200 acquires a specified interval, which is the difference between the specified time when a frame (representative frame) is transmitted from ECU 320C, the representative ECU of Group B, and the common reference time. The relay ECU 200 measures a specified interval, which is the difference between the specified time when a frame (representative frame) is transmitted from ECU 330G, the representative ECU of Group C, and the common reference time.

[0116] Figure 13 is a diagram illustrating the prescribed intervals for each group. The transmission cycles A, B, and C for groups A, B, and C start simultaneously. Therefore, every 300 ms, which is the common reference period, transmission cycles A, B, and C end and start simultaneously. The time when transmission cycles A, B, and C start (end) simultaneously is the common reference time.

[0117] ECU310D, the representative ECU for Group A, has a 4ms offset set. ECU310D transmits a frame 4ms after the common reference time. Furthermore, ECU310D transmits frames 54ms, 104ms, 154ms, 204ms, and 254ms after the common reference time.

[0118] ECU320C, the representative ECU for Group B, has a 22ms offset set. ECU320C transmits a frame 22ms after the common reference time. Furthermore, ECU320C transmits frames 122ms and 222ms after the common reference time.

[0119] ECU330G, the representative ECU for Group C, has a 32ms offset set. ECU330G transmits a frame 32ms after the common reference time. Furthermore, ECU330G transmits a frame 182ms after the common reference time.

[0120] Returning to Figure 10, the relay ECU 200 determines the transmission schedule for the representative frame based on the management table 220 in the second acquisition process 236.

[0121] In the second embodiment, the relay ECU 200 creates a second schedule table that shows the transmission schedule for representative frames. Figure 14 shows an example of the second schedule table. In the example in Figure 14, the second schedule table includes the transmission order, the CAN ID, and the specified interval.

[0122] In Figure 14, "Transmission Order" refers to the order in which representative frames are transmitted within a common reference period. Frame transmission order "1" is ECU310D (CAN ID: 0x101), with a specified interval of "4 ms". Frame transmission order "2" is ECU320C (CAN ID: 0x201), with a specified interval of "22 ms". Frame transmission order "3" is ECU330G (CAN ID: 0x301), with a specified interval of "32 ms". Frame transmission order "4" is ECU310D (CAN ID: 0x101), with a specified interval of "54 ms". Frame transmission order "5" is ECU310D (CAN ID: 0x101), with a specified interval of "104 ms". Frame transmission order "6" is ECU320C (CAN ID: 0x201) and the specified interval is "122 ms". Frame transmission order "7" is ECU310D (CAN ID: 0x101) and the specified interval is "154 ms". Frame transmission order "8" is ECU330G (CAN ID: 0x301) and the specified interval is "182 ms". Frame transmission order "9" is ECU310D (CAN ID: 0x101) and the specified interval is "204 ms". Frame transmission order "10" is ECU320C (CAN ID: 0x201) and the specified interval is "222 ms". Frame transmission order "11" is ECU310D (CAN ID: 0x101), and the specified interval is "254 ms".

[0123] Returning to Figure 10, in the second acquisition process 236, the relay ECU 200 acquires the specified interval from the created second schedule table.

[0124] The second determination process 237 is a process that determines whether or not to correct the frame transmission time of the representative ECU based on a comparison between the reception interval measured in the second measurement process 235 and the specified interval acquired in the second acquisition process 236.

[0125] Specifically, the relay ECU 200 calculates an evaluation value, which is the absolute value of the difference between the reception interval and the corresponding specified interval, and compares the evaluation value with a threshold. If the frame transmission time from the representative ECU deviates from the specified time by more than an acceptable range, the evaluation value exceeds the threshold. The first determination process described above can determine if there is a relative discrepancy in the frame transmission times between ECUs within the group. Even if the frame transmission time is corrected and the relative discrepancy in the frame transmission time determined by the first determination process is resolved, there is still a possibility that the frame transmission time of the entire group is out of sync with the common reference time. The second determination process 237 can determine if there is a discrepancy (i.e., an absolute discrepancy) in the transmission time of the representative frame with respect to the common reference time.

[0126] In the second determination process 237, the relay ECU 200 determines that it will correct the frame transmission time of the representative ECU. That is, the relay ECU 200 determines that a representative ECU whose frame transmission time is abnormal is subject to frame transmission time correction. For example, the relay ECU 200 determines that a representative ECU is subject to frame transmission time correction if it is determined that the frame transmission time of the same representative ECU is abnormal for a predetermined number of consecutive times.

[0127] The transmission process 238 is the process of sending a frame transmission time correction request to the representative ECU that has been determined to be subject to frame transmission time correction. The relay ECU 200 sends the correction request frame to the representative ECU that is subject to frame transmission time correction. As described above, even if the frame transmission times of the entire group are out of sync, the absolute discrepancy in the representative frame is resolved, so that the frame transmission times within the group are corrected to match the representative frame, and the frame transmission times of the entire group can be normalized.

[0128] [2-2. Operation of the Relay ECU] The operation of the relay ECU 200 according to the second embodiment will be described below. Figure 15 is a flowchart showing an example of initial processing by the relay ECU according to the second embodiment. Figure 16 is a flowchart showing an example of first communication control processing by the relay ECU according to the second embodiment. Figure 17 is a flowchart showing an example of second communication control processing by the relay ECU according to the second embodiment.

[0129] Referring to Figure 15, the initial processing will be explained. Initial processing is performed before the first and second communication control processing, and is a process for preparing the first and second communication control processing.

[0130] The processor 201 creates a first schedule table using the management table 220 (step S201). Furthermore, the processor 201 creates a second schedule table using the management table 220 (step S202). This completes the initial processing.

[0131] Referring to Figure 16, the first communication control process will be explained. The first communication control process is a process for correcting the relative difference in frame transmission times within a group. The processor 201 executes the first communication control process for each group of frame transmission cycles. That is, the processor 201 executes the first communication control process individually for each of groups A, B, and C. The first communication control process for one group will be explained below.

[0132] The processor 201 sets the variable j, which indicates the transmission order of the frames, to its initial value of "1" (step S211). Here, j is a natural number variable.

[0133] When the processor 201 receives a frame, it refers to the CAN ID of the received frame and compares it with the CAN ID corresponding to the transmission order j in the first schedule table. If the two CAN IDs match, the processor 201 relays the frame (step S212).

[0134] The processor 201 measures the reception interval, which is the difference between the reception time of the frame currently relayed and the reception time of the frame previously relayed within the same group (step S213). That is, the reception interval is the time from the reception of the (j-1)th frame to the reception of the (j)th frame. However, if j=1, it is not the (j-1)th frame, but the last frame in the transmission order of the frames in the first schedule table (hereinafter referred to as the Mth frame).

[0135] The processor 201 obtains a specified interval from the first schedule table, which is the difference between the specified transmission time of the frame currently relayed and the specified transmission time of the frame previously relayed within the same group (step S214). That is, the specified interval is the time from the specified transmission time of the (j-1)th frame to the specified transmission time of the (j)th frame. However, if j=1, it is the Mth frame instead of the (j-1)th frame.

[0136] The processor 201 calculates an evaluation value F1(j), which is the absolute value of the difference between the reception interval and the specified interval (step S215).

[0137] The processor 201 determines whether the evaluation value F1(j) is less than or equal to the threshold Th1 (step S216). However, Th1 is a fixed real number. If the evaluation value F1(j) is less than or equal to the threshold Th1 (YES in step S216), the processor 201 determines that the transmission time of the j-th frame is normal. If the evaluation value F1(j) is greater than the threshold Th1 (NO in step S216), the processor 201 determines that the transmission time of the j-th frame is abnormal.

[0138] If the evaluation value F1(j) is less than or equal to the threshold Th1 and the transmission time of the j-th frame is normal (YES in step S216), the processor 201 does not send a correction request frame. The processor 201 sets the variable cnt1 to "0" (step S217). However, cnt1 is a variable that indicates the number of consecutive times the transmission time of the frame of the CAN ID corresponding to the transmission order "j" in the first schedule table has been determined to be abnormal, and is a variable of 0 and natural numbers. That is, cnt1 is a variable assigned to each CAN ID. For example, the variable cnt1 corresponding to CAN ID "0x100" and the variable cnt1 corresponding to CAN ID "0x101" are different from each other, and each is stored in, for example, non-volatile memory 202. The variable cnt1 to which "0" is set in step S217 is the variable cnt1 assigned to the CAN ID corresponding to the transmission order j in the first schedule table.

[0139] If the evaluation value F1(j) is greater than the threshold Th1 and the transmission time of the j-th frame is abnormal (NO in step S216), the processor 201 increments cnt1 (cnt1 assigned to the CAN ID corresponding to the transmission sequence "j") (step S218).

[0140] The processor 201 determines whether cnt1 has reached a specified value m (step S219). The specified value m is, for example, "5". If cnt1 has not reached the specified value m (NO in step S219), the processor 201 proceeds to step S223.

[0141] If cnt1 reaches a specified value m (YES in step S219), the processor 201 calculates the correction time (step S220). The correction time is the difference between the reception interval and the specified interval. The processor 201 creates a correction request frame containing the CAN ID of the ECU that transmitted the j-th frame and the calculated correction time, and transmits the created correction request frame (step S221). Furthermore, the processor 201 resets cnt1 to "0" (step S222).

[0142] The processor 201 determines whether j = M, that is, whether the last transmission order in the first schedule table has been reached (step S223).

[0143] If j is not M (NO in step S223), the processor 201 increments j (step S224) and returns to step S212.

[0144] If j = M (YES in step S223), the processor 201 returns to step S211.

[0145] Referring to Figure 17, the second communication control process will be explained. The second communication control process is a process for correcting the absolute discrepancy in the transmission time of the representative frame. The second communication control process is executed in parallel with the first communication control process (that is, the execution period of the first communication control process and the execution period of the second communication control process overlap).

[0146] The processor 201 sets the variable k, which indicates the transmission order of the representative frame, to its initial value of "1" (step S231). Here, k is a natural number variable.

[0147] When the processor 201 receives a frame, it determines whether the received frame is a representative frame (step S232). Specifically, the processor 201 refers to the CAN ID of the received frame and compares it with the CAN ID corresponding to the transmission order k in the second schedule table. If the two CAN IDs do not match, the processor 201 determines that the received frame is not a representative frame; if the two CAN IDs match, it determines that the received frame is a representative frame. If the received frame is not a representative frame (NO in step S232), the processor 201 executes step S232 again.

[0148] If the received frame is a representative frame (YES in step S232), the processor 201 measures the reception interval, which is the difference between the reception time of the representative frame and the common reference time (step S233). That is, the reception interval is the time from the common reference time until the k-th representative frame is received.

[0149] The processor 201 obtains a specified interval from the second schedule table, which is the difference between the specified time for transmission of the k-th representative frame within the same group and the common reference time (step S234). That is, the specified interval is the time from the common reference time to the specified time for transmission of the k-th frame.

[0150] The processor 201 calculates an evaluation value F2(k), which is the absolute value of the difference between the reception interval and the specified interval (step S235).

[0151] The processor 201 determines whether the evaluation value F2(k) is less than or equal to the threshold Th2 (step S236). However, Th2 is a fixed real number. If the evaluation value F2(k) is less than or equal to the threshold Th2 (YES in step S236), the processor 201 determines that the transmission time of the k-th representative frame is normal. If the evaluation value F2(k) is greater than the threshold Th2 (NO in step S236), the processor 201 determines that the transmission time of the k-th representative frame is abnormal.

[0152] If the evaluation value F2(k) is less than or equal to the threshold Th2 and the transmission time of the k-th representative frame is normal (YES in step S236), the processor 201 does not send a correction request frame. The processor 201 sets the variable cnt2 to "0" (step S237). However, cnt2 is a variable that indicates the number of consecutive times the transmission time of the representative frame of the CAN ID corresponding to the transmission order "k" in the second schedule table has been determined to be abnormal, and is a variable of 0 and natural numbers. That is, cnt2 is a variable assigned to each CAN ID of the representative ECU. For example, the variable cnt2 corresponding to CAN ID "0x101" and the variable cnt2 corresponding to CAN ID "0x201" are different from each other, and each is stored in, for example, non-volatile memory 202. The variable cnt2 to which "0" is set in step S237 is the variable cnt2 assigned to the CAN ID corresponding to the transmission order k in the second schedule table.

[0153] If the evaluation value F2(k) is greater than the threshold Th2 and the transmission time of the k-th frame is abnormal (NO in step S236), the processor 201 increments cnt2 (cnt2 assigned to the CAN ID corresponding to the transmission sequence "k") (step S238).

[0154] The processor 201 determines whether cnt2 has reached a specified value l (step S239). The specified value l is, for example, "5". If cnt2 has not reached the specified value l (NO in step S239), the processor 201 proceeds to step S243.

[0155] If cnt2 reaches a specified value l (YES in step S239), the processor 201 calculates the correction time (step S240). The correction time is the difference between the reception interval and the specified interval. The processor 201 creates a correction request frame containing the CAN ID of the representative ECU that transmitted the k-th representative frame and the calculated correction time, and transmits the created correction request frame (step S241). Furthermore, the processor 201 resets cnt2 to "0" (step S242).

[0156] The processor 201 determines whether k = L (step S243). Here, L is the total number of representative frames transmitted in the common reference period and is the last transmission order in the second schedule table. In other words, the processor 201 determines whether the last transmission order in the second schedule table has been reached.

[0157] If k is not L (NO in step S243), the processor 201 increments k (step S244) and returns to step S232.

[0158] If k = L (YES in step S243), the processor 201 returns to step S231.

[0159] [3. Other Embodiments] In the above embodiments, the communication control device is the relay ECU 200, but the invention is not limited thereto. An ECU other than the relay ECU 200 may be used as the communication control device. For example, an ECU that functions as a communication control device may be provided for each of the buses 400A, 400B, and 400C.

[0160] [4. Supplementary Notes] The embodiments disclosed herein are illustrative in all respects and are not restrictive. The scope of the present invention is indicated by the claims rather than by the embodiments described above, and includes the meaning of equivalents of the claims and all modifications within that scope.

[0161] 100 In-vehicle system 200 Relay ECU 201 Processor 202 Non-volatile memory 203 Volatile memory 204A, 204B, 204C Communication interface (communication I / F) 205 Data bus 210 Communication control program 211 Relay processing 212 Measurement processing 213 Acquisition processing 214 Judgment processing 215 Transmission processing 220 Management table 231 Relay processing 232 First measurement processing 233 First acquisition processing 234 First judgment processing 235 Second measurement processing 236 Second acquisition processing 237 Second judgment processing 238 Transmission processing 310A, 320B, 320C, 310D, 320E, 330F, 330G, 310H, 330I ECU 400A, 400B, 400C Communication bus 500A, 500B, 500C First Schedule Table

Claims

1. A communication control device for controlling communication in an in-vehicle network to which a plurality of in-vehicle devices are connected, comprising a processor, the processor performing operations including: a measurement process for measuring a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; an acquisition process for acquiring a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; a first determination process for determining whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and a transmission process for transmitting a frame transmission time correction request to at least one of the first in-vehicle device and the second in-vehicle device to which it was determined that the frame transmission time should be corrected.

2. The communication control device according to claim 1, wherein the measurement process includes measuring a first reception interval which is the difference between the first reception time and the second reception time, and measuring a second reception interval which is the difference between the second reception time and the third reception time when a frame transmitted from the third in-vehicle device is received; the acquisition process includes acquiring a first specified interval which is the difference between the first specified time and the second specified time, and acquiring a second specified interval which is the difference between the second specified time and the third specified time when frame transmission from the third in-vehicle device is specified; and the first determination process includes determining the target for correction of the frame transmission time to be one of the first in-vehicle device, the second in-vehicle device, and the third in-vehicle device based on a comparison of the first reception interval and the first specified interval, and a comparison of the second reception interval and the second specified interval.

3. The communication control device according to claim 1 or 2, wherein the acquisition process includes determining a frame transmission schedule that includes the order of frame transmissions of the plurality of in-vehicle devices and a specified interval that is the difference between adjacent frame transmission times, based on the frame transmission cycles of the plurality of in-vehicle devices and a frame transmission offset that is the interval from a reference time to a frame transmission time in the frame transmission cycle, and acquiring the specified interval from the frame transmission schedule.

4. The communication control device according to any one of claims 1 to 3, wherein the frame transmission period of the first in-vehicle device and the frame transmission period of the second in-vehicle device are the same.

5. The communication control device according to any one of claims 1 to 3, wherein the first frame transmission period of the first in-vehicle device and the second frame transmission period of the second in-vehicle device are different from each other.

6. The in-vehicle system includes a first representative in-vehicle device that transmits a first representative frame at the same first frame transmission cycle as the frame transmission cycle of the first in-vehicle device, the operation further includes a second determination process that determines whether or not to correct the transmission time of the first representative frame based on the interval between a first representative reception time, which is the reception time of the first representative frame, and a reference time, and the transmission process includes, if it is determined that the transmission time of the first representative frame should be corrected, sending a request to correct the transmission time of the first representative frame to the first representative in-vehicle device, the communication control device according to claim 4.

7. The communication control device according to claim 6, wherein the in-vehicle system further includes a second representative in-vehicle device that transmits a second representative frame at a second frame transmission cycle different from the first frame transmission cycle, the reference time is a time that repeatedly occurs at each reference cycle which is the least common multiple of the first frame transmission cycle and the second frame transmission cycle, and the second determination process includes determining whether or not to correct the transmission time of the second representative frame based on the interval between the second representative reception time, which is the reception time of the second representative frame, and the reference time.

8. A communication control method for controlling communication in an in-vehicle network to which a plurality of in-vehicle devices are connected, comprising: measuring a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; acquiring a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; determining whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and, if it is determined that the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device should be corrected, sending a frame transmission time correction request to at least one of the first in-vehicle device and the second in-vehicle device that was determined to correct the frame transmission time.

9. A communication control program for controlling communication in an in-vehicle network to which multiple in-vehicle devices are connected, the program for causing a computer to perform the following steps: measuring a reception interval which is the difference between a first reception time when a frame transmitted from a first in-vehicle device is received and a second reception time when a frame transmitted from a second in-vehicle device is received; acquiring a specified interval which is the difference between a first specified time when frame transmission from the first in-vehicle device is specified and a second specified time when frame transmission from the second in-vehicle device is specified; determining whether or not to correct the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device based on a comparison of the measured reception interval and the acquired specified interval; and, if it is determined that the frame transmission time of at least one of the first in-vehicle device and the second in-vehicle device should be corrected, sending a frame transmission time correction request to at least one of the first in-vehicle device and the second in-vehicle device that was determined to have its frame transmission time corrected.