Scheduling device, control method, and control program
The scheduling device optimizes execution timings and cycles for vehicle-mounted control devices to address the challenge of rising power consumption in parallel execution scenarios, ensuring efficient power management in automotive systems.
Patent Information
- Application Number
- PCT/JP2024/011041
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-28
- Filing Date
- 2024-03-21
- Publication Date
- 2024-10-03
AI Technical Summary
In automotive sleeve control systems, as more applications are executed in parallel, the effective sleep period shortens, leading to increased power consumption that becomes difficult to suppress.
A scheduling device that determines optimal execution start timings and cycles for multiple vehicle-mounted control devices via a communication bus to minimize total power consumption, even when numerous functions are executed in parallel.
The solution effectively suppresses power consumption of on-vehicle control devices by determining and setting execution start timings and cycles that minimize total power usage, even under conditions of high parallel function execution.
Smart Images

Figure JP2024011041_03102024_PF_FP_ABST
Abstract
Description
Scheduling device, control method, and control program
[0001] This application claims priority to Japanese Patent Application No. 2023-051830 filed on March 28, 2023, and incorporates by reference all of the contents of that application.
[0002] A vehicle is equipped with a variety of on-board devices, such as control system ECUs (Electronic Control Units) that control the engine, transmission, etc., vehicle system ECUs that control headlights, power windows, etc., and information system ECUs for navigation devices, multimedia devices, etc.
[0003] Patent document 1 discloses a sleep control system for an automobile in which, even if the sleep periods differ between multiple applications, a sleep control information acquisition means individually acquires information regarding the requested sleep period from each application, and further, an effective sleep period calculation means finds a period that is commonly included in the acquired requested sleep periods as an effective sleep period, and uses this effective sleep period to control the sleep / wake-up of the hardware control-based system.
[0004] Japanese Patent Application Laid-Open No. 2006-151007
[0005] A scheduling device according to one aspect of the present disclosure is a scheduling device that schedules functions to be executed by a plurality of vehicle control devices that can communicate with each other via a communication bus, and includes an acquisition unit that acquires first information for determining a first execution start timing, which is the timing at which a first function executed by a first vehicle control device and a second vehicle control device is started, and a first execution period, which is the period at which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first vehicle control device and a third vehicle control device is started, and a second execution period, which is the period at which the second function is executed, and a determination unit that determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period based on the first information and the second information so that the total power consumption of the first vehicle control device, the second vehicle control device, and the third vehicle control device is minimized.
[0006] The present disclosure can be realized not only as a scheduling device having the above-described characteristic configuration, a control method in which characteristic processing in the scheduling device is performed as steps, and a control program for causing the in-vehicle control device to execute the characteristic processing, but also as a semiconductor integrated circuit in which part or all of the in-vehicle control device is realized.
[0007] FIG. 1 is a block diagram showing an example of the configuration of an in-vehicle system including a scheduling device according to a first embodiment. FIG. 2 is a block diagram showing an example of the configuration of a GW according to the first embodiment. FIG. 3 is a block diagram showing an example of the configuration of an ECU according to the first embodiment. FIG. 4 is an example of a cluster table indicating to which cluster an ECU belongs. FIG. 5 is a functional block diagram showing an example of functions of a GW according to the first embodiment. FIG. 6 is a diagram showing an example of information for determining an execution start timing and an execution period. FIG. 7 is a diagram showing an operation when two functions are executed in parallel. FIG. 8 is a diagram showing an operation when two functions are executed simultaneously in time. FIG. 9 is a diagram showing an operation when two functions are executed with different execution periods. FIG. 10 is a diagram showing an operation when two functions are executed simultaneously in time with the same execution period. FIG. 11 is a flowchart showing an example of the operation of the scheduling device according to the first embodiment. FIG. 12 is a flowchart showing an example of an execution start timing and execution period determination routine. FIG. 13 is a functional block diagram showing an example of functions of a scheduling device according to a second embodiment. FIG. 14 is a flowchart showing an example of the operation of the scheduling device according to the second embodiment. FIG. 15 is a diagram showing an example of execution condition information including restriction information. Fig. 16 is a diagram illustrating an example of the order of execution of the first to third functions. Fig. 17 is a diagram illustrating an example of the order of execution of the first to third functions. Fig. 18 is a flowchart illustrating an example of the operation of the scheduling device according to the third embodiment.
[0008] [Problem to be solved by the invention] However, the automobile sleep control system of Patent Document 1 uses the period commonly included in the requested sleep periods of each application as the effective sleep period, and as the number of applications running in parallel increases, the sleep period becomes shorter, making it impossible to suppress power consumption, which is a problem.
[0009] Effect of the Invention According to the present disclosure, it is possible to reduce the power consumption of an on-board control device even if the number of functions executed in parallel increases.
[0010] <Outline of Embodiments of the Present Disclosure> Below, an outline of embodiments of the present disclosure will be listed and described.
[0011] (1) A scheduling device according to this embodiment schedules functions executed by a plurality of on-board control devices that can communicate with each other via a communication bus, and includes: an acquisition unit that acquires first information for determining a first execution start timing, which is a timing at which a first function executed by a first on-board control device and a second on-board control device is started, and a first execution period, which is a period at which the first function is executed, and second information for determining a second execution start timing, which is a timing at which a second function executed by the first on-board control device and a third on-board control device is started, and a second execution period, which is a period at which the second function is executed, based on the first information and the second information, and a determination unit that determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period so as to minimize the total power consumption of the first on-board control device, the second on-board control device, and the third on-board control device. This makes it possible to reduce the power consumption of the on-board control devices even when a large number of functions are executed in parallel.
[0012] (2) In the above (1), a setting unit is further provided that sets the first execution start timing and the first execution period determined by the determination unit in the first in-vehicle control device and the second in-vehicle control device, and sets the second execution start timing and the second execution period determined by the determination unit in the first in-vehicle control device and the third in-vehicle control device. This makes it possible to reduce power consumption of the in-vehicle control devices even when a number of functions are executed in parallel.
[0013] (3) In the above (1) or (2), the determination unit determines a first setting range, which is a range within which the first execution period should be limited, based on the first information, determines the first execution start timing and the first execution period based on the first setting range, determines a second setting range, which is a range within which the second execution period should be limited, based on the second information, and determines the second execution start timing and the second execution period based on the second setting range. This allows the execution period to be determined within a range within which the execution period of the function should be limited, and allows the first function and the second function to be executed in an overlapping manner. As a result, power consumption of the on-board control device can be reduced even if a large number of functions are executed in parallel.
[0014] (4) In the above (3), the first set range is determined based on a first cycle initial value, which is an initial value of the cycle for which the first function is executed, and a first allowable range, which is a range within which the first cycle initial value can be changed, and the second set range is determined based on a second cycle initial value, which is an initial value of the cycle for which the second function is executed, and a second allowable range, which is a range within which the second cycle initial value can be changed. This makes it possible to determine the execution cycle based on the cycle initial value and the allowable range, and to execute the first function and the second function in an overlapping manner. As a result, it is possible to reduce power consumption of the on-board control device even if the number of functions executed in parallel increases.
[0015] (5) In the above (4), the first information includes a first execution duration that is a time from when the first function starts to when it ends in the first execution cycle, and the second information includes a second execution duration that is a time from when the second function starts to when it ends in the second execution cycle. This allows the first function and the second function to be executed overlappingly with some leeway, allowing for flexible decision-making.
[0016] (6) In the above (5), the determination unit calculates the power consumption of each of the first on-board controller, the second on-board controller, and the third on-board controller based on the first execution duration and the second execution duration, and determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption. This makes it possible to easily calculate the total power consumption.
[0017] (7) In any one of (1) to (6) above, the first information includes information indicating a limiting condition under which execution of the first function is limited, and the determination unit determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period while avoiding the limiting condition. This makes it possible to calculate a schedule that can reduce power consumption of the on-board control device even when there is a condition under which execution of the function is limited.
[0018] (8) In the above (7), the restriction condition includes a condition that restricts the first function and the second function from being executed in a time-overlapping manner. This makes it possible to calculate a schedule that can reduce power consumption of the on-board control device even when the overlapping execution of functions is restricted.
[0019] (9) In the above (6), the restriction condition includes at least one of a condition related to a restriction on a hardware resource used by the first function and a condition related to a restriction on a hardware resource used by the second function. This makes it possible to calculate a schedule that can reduce power consumption of the on-board control device even when there is a restriction on the hardware resource used by the function.
[0020] (10) A control method according to this embodiment is a control method used by a scheduling device that schedules functions executed by multiple on-board control devices that can communicate with each other via a communication bus, and includes the steps of acquiring first information for determining a first execution start timing, which is a timing at which a first function executed by a first on-board control device and a second on-board control device is started, and a first execution period, which is a period at which the first function is executed, and second information for determining a second execution start timing, which is a timing at which a second function executed by the first on-board control device and a third on-board control device is started, and a second execution period, which is a period at which the second function is executed, based on the first information and the second information, and determining the first execution start timing, the first execution period, the second execution start timing, and the second execution period so as to minimize the total power consumption of the first on-board control device, the second on-board control device, and the third on-board control device. This makes it possible to reduce the power consumption of the on-board control devices even when a large number of functions are executed in parallel.
[0021] (11) A control program according to this embodiment is a control program used by a scheduling device that schedules functions executed by multiple on-board control devices that can communicate with each other via a communication bus, and causes a computer to execute the following steps: acquiring first information for determining a first execution start timing, which is a timing at which a first function executed by a first on-board control device and a second on-board control device is started, and a first execution period, which is a period at which the first function is executed, and second information for determining a second execution start timing, which is a timing at which a second function executed by the first on-board control device and a third on-board control device is started, and a second execution period, which is a period at which the second function is executed, based on the first information and the second information; and determining the first execution start timing, the first execution period, the second execution start timing, and the second execution period, which minimize the total power consumption of the first on-board control device, the second on-board control device, and the third on-board control device, based on the first information and the second information. This makes it possible to reduce power consumption of the on-board control devices even when a large number of functions are executed in parallel.
[0022] <First Embodiment> [1. Details of First Embodiment of the Present Disclosure] Hereinafter, details of the first embodiment of the present disclosure will be described with reference to the drawings. Note that at least some of the embodiments described below may be combined in any manner.
[0023] [1-1. In-Vehicle System] FIG. 1 is a block diagram showing an example of the configuration of an in-vehicle system including a scheduling device according to a first embodiment. The in-vehicle system 1 is mounted on a vehicle. The scheduling device schedules the execution timing of functions executed by a plurality of in-vehicle control devices that can communicate with each other via a communication bus. The scheduling device is realized, for example, as a gateway (hereinafter referred to as GW) that comprehensively controls individual in-vehicle control devices (hereinafter simply referred to as "ECUs") that execute predetermined functions. The gateway is sometimes called an integrated ECU as a type of ECU. The scheduling device can also be realized as a server outside the vehicle. The following description will be given taking a gateway as an example.
[0024] The in-vehicle system 1 according to the first embodiment includes a gateway 2 (GW) 2, an ECU 3a, and an ECU 3b. The in-vehicle system 1 is an in-vehicle network configured with an integrated ECU 2, the ECU 3a, the ECU 3b, and a communication cable (communication bus) connecting them. Note that the ECU 3a and the ECU 3b may be collectively referred to as "ECU 3" below.
[0025] The ECUs 3 are arranged in various parts of the vehicle. The ECUs 3 individually control the hardware of each part of the vehicle and monitor the status of the hardware of each part of the vehicle. For example, the ECUs 3 are ECUs for a control system, a vehicle body, and an information system.
[0026] The GW 2 is connected to each of the ECUs 3 via communication buses 12a and 12b, such as a CAN (Controller Area Network) bus. Specifically, the GW 2 includes communication interfaces (communication I / F) 11a and 11b. The communication I / F 11a is connected to the communication bus 12a. The ECU 3a is connected to the communication bus 12a. The communication I / F 11b is connected to the communication bus 12b. The ECU 3b is connected to the communication bus 12b. The GW 2 can communicate with each of the ECUs 3 mutually.
[0027] Each of the ECUs 3 includes a communication I / F 13a, 13b connected to the communication bus. The communication I / Fs 13a, 13b are compatible I / Fs that support the partial network function. When using the partial network function, the GW 2 and the ECU 3 use a communication protocol that supports the partial network function. The communication protocol is, for example, CAN, CAN with Flexible Data Rate (CAN FD), or CAN with Partial Networking (CAN PN).
[0028] The partial network function is a function in an in-vehicle system in which each in-vehicle device is connected via a bus network, in which the in-vehicle devices are divided into clusters called PNCs (Partial Network Clusters) for each function (service), and the in-vehicle devices of the PNCs used to execute the service are woken up, and the in-vehicle devices of the other PNCs are put to sleep.
[0029] The GW2 functions as a gateway that relays communications between the ECUs 3. The GW2 and the ECUs 3 can transmit frames. The GW2 relays frames between ECUs connected to different buses. For example, the GW2 can relay frames between the ECU 3a connected to the communication bus 12a and the ECU 3b connected to the communication bus 12b. This allows frames to be transmitted and received between the ECU 3a connected to the communication bus 12a and the ECU 3b connected to the communication bus 12b, for example.
[0030] [1-2. GW Configuration] The hardware configuration of the GW 2 will be described below.
[0031] 2 is a block diagram showing an example of the configuration of the GW 2 according to embodiment 1. The GW 2 includes a microcontroller unit 21 (hereinafter referred to as "MCU 21") including a control unit 22 and a memory 23, and a plurality of communication I / Fs 11a and 11b. The control unit 22, the memory 23, and the communication I / Fs 11a and 11b are electrically connected via an internal bus 24.
[0032] The control unit 22 includes a circuit configuration such as a processor. Specifically, the control unit 22 includes one or more central processing units (CPUs). The processor included in the control unit 22 may be a graphics processing unit (GPU). In this case, the control unit 22 reads out computer programs stored in the memory 23 and executes various calculations and controls.
[0033] The control unit 22 may include a processor in which a predetermined program is written in advance. For example, the control unit 22 may be an integrated circuit such as a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC). In this case, the control unit 22 executes various calculations and controls based on the program written in advance.
[0034] The memory 23 includes a volatile memory and a nonvolatile memory, and stores various types of data. The volatile memory includes, for example, a random access memory (RAM). The nonvolatile memory includes, for example, a flash memory, a hard disk drive (HDD), a solid state drive (SSD), or a read-only memory (ROM). A portion of the nonvolatile memory may be provided outside the MCU 21.
[0035] The memory 23 stores, for example, in a nonvolatile memory, computer programs, information for determining the execution timing of functions executed by the ECU (described later), and various parameters. The memory 23 may also store computer programs downloaded from an external device (not shown) via a network (not shown) and a communication device (not shown).
[0036] The communication I / Fs 11a and 11b receive signals flowing through the communication buses 12a and 12b via ports (not shown) and convert the signals into signals that can be read by the MCU 21. The communication I / Fs 11a and 11b are connected to the communication buses 12a and 12b, respectively. [1-3. Configuration of the ECU] The hardware configuration of the ECU 3 will now be described.
[0037] 3 is a block diagram showing an example of the configuration of the ECU according to embodiment 1. The ECU 3a includes a microcontroller unit 31, a communication I / F 13a, and a peripheral circuit 34. The ECU 3b has the same configuration as the ECU 3a.
[0038] The microcontroller unit 31 (hereinafter referred to as "MCU 31") has the same configuration as the MCU 21 of the GW 2 described above. That is, the MCU 31 includes a control unit (processor) 32 and a memory 33 including a non-volatile memory and a volatile memory. The MCU 31 may also include a peripheral circuit 34 and a communication I / F 13a.
[0039] The memory 33 stores a control program, which is a computer program, and data used to execute the control program. The control program can be stored in a recording medium such as a flash memory, a ROM, or a CD-ROM. The processor 32 enables the ECU 3a to use a partial network function by using the control program.
[0040] The peripheral circuit 34 includes a serial communication circuit that complies with standards such as UART, I2C, SPI, etc. The serial communication circuit of the peripheral circuit 34 is connected to a device or sensor that is the control target of the ECU 3a, and can receive signals output from the sensor and transmit control signals to the control target.
[0041] The communication I / F 13a is a communication interface that complies with the above-mentioned communication protocol for the in-vehicle network and is an I / F that supports the partial network function.
[0042] [1-4. Cluster] Figure 4 shows an example of a cluster table that indicates to which cluster each ECU belongs when the ECU belongs to a cluster. Clusters will be explained below. A cluster is what was referred to as a PNC above. Each ECU 3 belongs to at least one cluster. The memory 23 of the GW 2 stores a cluster table 41 that links the ECUs 3 with the clusters to which each ECU 3 belongs. The cluster table 41 may be stored in each ECU 3.
[0043] Examples of functions executed by a plurality of ECUs include a periphery monitoring function using an image sensor (hereinafter referred to as the "periphery monitoring function") and a vehicle information collection function.
[0044] Periphery monitoring is performed by the ECU 3a and the GW2. Therefore, the image ECU and the GW2 belong to the same cluster. The ECU 3a performs a function (first function a) of acquiring images from an image sensor that captures images of the vehicle periphery and transmitting frames containing the acquired images to the GW2. The GW2 receives frames containing images transmitted from the image ECU and performs a function (first function b) of recognizing people from the received images.
[0045] The vehicle information collection function is executed by, for example, the GW2 and the ECU 3b. Therefore, the GW2 and the ECU 3b belong to the same cluster. The GW2 executes a function (second function a) in which the GW2 receives predetermined vehicle information from predetermined ECUs via the communication buses 12a and 12b and transmits a frame including the received vehicle information to the ECU 3b. The ECU 3b, which is a TCU (Telematic control unit), executes a function (second function b) in which the GW2 receives a frame including the vehicle information transmitted from the GW2 and uploads the received vehicle information to a server outside the vehicle. The vehicle information collected here includes the battery voltage, the engine speed detected by an engine tachometer, etc.
[0046] The cluster table 41 shown in Fig. 4 indicates which GWs and ECUs belong to two clusters PNC1 and PNC2. Note that the number of clusters in Fig. 4 is an example, and two or more clusters may be prepared. In the table, "1" indicates that the GW or ECU belongs to the cluster in that row, and "0" indicates that the GW or ECU does not belong to the cluster in that row.
[0047] For example, a GW2 and an ECU 3a belong to cluster PNC1. A first function, for example, a periphery monitoring function, is executed by the GW2 and ECU 3a belonging to cluster PNC1. A GW2 and an ECU 3b belong to cluster PNC2. A second function, for example, a vehicle information collection function, is executed by the GW2 and ECU 3b belonging to cluster PNC2. In the following description, "waking up GW2 and 3a belonging to cluster PNC1" is also simply expressed as "waking up cluster PNC1." Similar expressions are used for other clusters PNC2.
[0048] [1-5. Operation Mode] The operation modes and wake-up operations of the GW 2 and ECU 3 will be described.
[0049] The operation modes of the GW 2 and the ECU 3 include a normal mode and a sleep mode. In the normal mode, the GW 2 and the ECU 3 are in operation, control the control target, and communicate with the GW 2 and the ECU 3 other than the GW 2 and the ECU 3 itself. In the sleep mode, the GW 2 and the ECU 3 are stopped except for some functions of the communication I / Fs 11a, 11b, 13a, and 13b. In the CAN, when some clusters are woken up using the partial network function, a frame specifying the cluster to be woken up is transmitted to the communication buses 12a and 12b. The wake-up request, i.e., the frame specifying the cluster to be woken up, is transmitted, for example, by the ECU 3a. In the case of the ECU 3a, the frame is created using the cluster table 41. However, the source of the frame is not limited to the ECU 3a; the GW 2 and the ECU 3b may also transmit the frame.
[0050] The communication I / Fs 11a and 11b of the GW 2 and the communication I / Fs 13a and 13b of the ECU 3, which are in sleep mode, receive a frame and determine whether the cluster to which the device belongs is specified in the frame. If the cluster to which the device belongs is not specified, the GW 2 and the ECU 3 remain in sleep mode. If the cluster to which the device belongs is specified, the communication I / Fs 11a, 11b, 13a, and 13b interrupt the control unit (processor) and instruct it to switch from sleep mode to normal mode. This wakes up the GW 2 and the ECU 3 that belong to the specified cluster.
[0051] On the other hand, the GW2 and the ECU3 transition from the normal mode to the sleep mode when the processing related to their own functions is completed. That is, the GW2 and the ECU3 are configured to receive a frame and transition from the sleep mode to the normal mode, and then transition back to the sleep mode after the series of processing is completed. Therefore, the GW2 and the ECU3 transition to the sleep mode when frames are no longer received, and remain in the sleep mode. The GW2 and the ECU3 may be configured to transition to the sleep mode after a predetermined period of time has elapsed after the series of processing is completed.
[0052] The transition to the sleep mode of the GW 2 and the ECU 3 is not limited to when a frame is no longer received. For example, the GW 2 and the ECU 3 may be configured to transition to the sleep mode when a frame including a command to transition to the sleep mode is received.
[0053] When the system transitions from sleep mode to normal mode, the GW2 and ECU3 operate on a predetermined clock. In sleep mode, the clock stops and the GW2 and ECU3 are stopped. Therefore, in normal mode, the power consumption by the GW2 and ECU3 is large. On the other hand, in sleep mode, the power consumption by the GW2 and ECU3 is small. Note that in normal mode, the communication I / Fs 11a, 11b, 13a, and 13b operate. In sleep mode, some functions of the communication I / Fs 11a, 11b, 13a, and 13b are stopped.
[0054] 1-7. Functions of the GW FIG. 5 is a functional block diagram showing an example of functions of the GW according to the first embodiment.
[0055] The GW 2 has the functions of an acquisition unit 51 and a determination unit 52. The acquisition unit 51 and the determination unit 52 are functions of the MCU 21. The functions of the acquisition unit 51 and the determination unit 52 are realized by the MCU 21 executing a control program.
[0056] [1-7-1. Acquisition Unit] The acquisition unit 51 acquires first information for determining a first execution start timing, which is the timing at which a first function executed by the first in-vehicle control device and the second in-vehicle control device is started, and a first execution period, which is the period at which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first in-vehicle control device and the third in-vehicle control device is started, and a second execution period, which is the period at which the second function is executed.
[0057] Specifically, the first function executed by the first on-board control device and the second on-board control device is, for example, a periphery monitoring function executed by an image ECU (ECU3a) that acquires images from an image sensor that photographs the periphery of the vehicle and a GW2 that recognizes people from the acquired images. The second function executed by the first on-board control device and the third on-board control device is, for example, a vehicle information collection function in which the GW2 receives predetermined vehicle information from predetermined ECUs via communication buses 12a and 12b, and the TCU ECU3b uploads the vehicle information to a server outside the vehicle. The periphery monitoring function, which is the first function, and the vehicle information collection function, which is the second function, are executed by the GW2, which is the first on-board control device in common.
[0058] The execution period is a period during which a function such as a perimeter monitoring function is repeatedly executed. The perimeter monitoring function is executed by an image ECU that acquires images from an image sensor and a GW2 that recognizes people from the acquired images. The image ECU, ECU 3a, wakes up at each execution period to execute the perimeter monitoring function. The ECU 3a wakes up when a timer included in the ECU 3a issues an interrupt to the ECU 3a itself. A value such as 3 ms is set in the timer. The perimeter monitoring function is executed every 3 ms, and in this case, 3 ms is a specific example of the execution period.
[0059] The execution start timing is the timing at which execution of a function starts. The execution start timing is the point at which the time indicated by the execution start timing has elapsed from the reference time. For example, if a master clock that controls the reference time for the entire vehicle is provided in one of the gateway, the ECU, or an external server, and the timers of each ECU are synchronized to the master clock, the reference time is the time when the master clock starts. Alternatively, if multiple functions are being executed, the reference time is the time when execution of any one of the multiple functions, function A, starts. Specifically, when the perimeter monitoring function and the vehicle information collection function are executed, for example, the timer of the gateway 2 that executes the vehicle information collection function starts in synchronization with the time when the ECU 3a that executes the perimeter monitoring function starts execution of the function. The execution start timing of the vehicle information collection function is set in the timer of the gateway 2. After the time indicated by the execution start timing has elapsed, the timer of the gateway 2 starts the vehicle information collection function by, for example, interrupting the gateway 2 itself. As a result, the vehicle information collection function starts execution after the time indicated by the execution start timing has elapsed, based on the time when execution of the perimeter monitoring function started.
[0060] The first information is information for determining a first start timing, which is the timing at which a function is started, and a first execution period, which is the period at which the function is executed. The second information is information for determining a second start timing, which is the timing at which a function is started, and a second execution period, which is the period at which the function is executed.
[0061] FIG. 6 illustrates an example of information for determining the execution start timing and the execution period. Hereinafter, the first information for determining the first execution start timing and the first execution period, and the second information for determining the second execution start timing and the second execution period, may be collectively referred to as "execution condition information." The first execution start timing and the second execution start timing may be collectively referred to as "execution start timing," and the first execution period and the second execution period may be collectively referred to as "execution period." The execution condition information is determined taking each function into consideration and is, for example, information in a table format such as that shown in FIG. 6. The execution condition information lists information for determining the execution start timing and the execution period of each function, associated with an identifier that identifies the function. Examples of the listed information include the initial value of the execution period, the allowable range for changing the execution period, the execution duration, and the limiting conditions.
[0062] The initial execution period is the typical initial value of the execution period required for the function to be executed to perform its function. The initial execution period value can be, for example, 2 ms or 3 ms. The allowable range of execution period change is the range of allowable change from the initial execution period value. The execution period required for the function to be executed has a range, and the allowable range of execution period change indicates how much the execution period can be changed from the initial value. The allowable range of execution period change can be, for example, ±1 ms. Note that while the initial value and its allowable change range have been described here, it is also possible to specify the minimum and maximum values of the execution period. The execution duration is the time from the start to the end of a function executed at a specified execution period. The execution duration can be, for example, 0.2 ms or 0.3 ms.
[0063] A limiting condition is a condition that limits the execution of a function. The condition that limits the execution of a function may be specified according to the needs of the function, or may not be specified at all. For example, the limiting condition may be specified as information indicating that parallel operation is not possible, so that the function has a high priority and is not executed in parallel with other functions. Alternatively, if a second function starts executing after the execution of a first function is completed and receives the result of the first function, the limiting condition for the second function may be specified as information indicating that the second function will be executed after the first function is completed. Note that if a limiting condition is not specified, the execution start timing and execution period are determined based on the initial value of the execution period and the allowable range for changing the execution period.
[0064] The acquisition unit acquires the execution condition information. The execution condition information is stored, for example, in a non-volatile memory of the memory 23 of the GW2. The control unit 22 reads the execution condition information stored in the memory 23 and acquires the execution condition information. The execution condition information may be stored for each function by, for example, an ECU that executes a function. Specifically, the execution condition information for the perimeter monitoring function may be stored in the ECU 3a, which is the image ECU, and the execution condition information for the vehicle information collection function may be stored in the GW2. In this case, the acquisition unit 51 may acquire the execution condition information for the perimeter monitoring function from the ECU 3a and the execution condition information for the vehicle information collection function from the GW2. The execution condition information may be stored in a server outside the vehicle. In this case, the acquisition unit 51 accesses the server via a communication network to acquire the necessary execution condition information. If the scheduling device is implemented as a server, the acquisition unit 51 acquires the execution condition information directly from the device itself, without going through a communication network.
[0065] [1-7-2. Determination Unit] The determination unit 52 determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption of the first on-board control device, the second on-board control device, and the third on-board control device, based on the first information and the second information.
[0066] The GW and each ECU consume a predetermined amount of power to perform a predetermined function. For example, GW2 consumes 20 W (watts), ECU3a consumes 5 W, and ECU3b consumes 10 W. Here, the power consumption does not have to be the actual power consumption, but may be a relative value of the power consumption of each ECU. This is because even relative values can be used for comparison. For example, GW2 consumes 4 W, ECU3a consumes 1 W, and ECU3b consumes 2 W.
[0067] FIG. 7 is a diagram showing the operation when two functions are executed in parallel. Periphery monitoring using an image sensor is executed by the ECU 3a and the GW2. The ECU 3a executes the function of acquiring images from an image sensor that captures the periphery of the vehicle and transmitting frames containing the acquired images to the GW2. This is the portion 71a shown in FIG. 7. The GW2 receives frames containing images transmitted from the image ECU, and upon receiving the frames, the GW2 wakes up. The woken-up GW2 executes the function of recognizing people from the received images. This is the portion 71b shown in FIG. 7. As shown in FIG. 7, the periphery monitoring function is executed continuously for 0.2 ms, for example, every 3 ms.
[0068] On the other hand, the vehicle information collection function is executed by the GW2 and the ECU 3b. The GW2 receives predetermined vehicle information from predetermined ECUs via the communication buses 12a and 12b, and transmits a frame including the received vehicle information to the ECU 3b. This is shown as part 72a in FIG. 7. The ECU 3a receives the frame including the vehicle information transmitted from the GW2, and the ECU 3b that receives the frame wakes up. The woken up ECU 3b uploads the received frame including the vehicle information to a server located outside the vehicle. This is shown as part 72b in FIG. 7. As shown in FIG. 7, the vehicle information collection function is executed for a period of 0.3 ms, for example, every 3 ms, with a delay of 1 ms after the execution of the periphery monitoring function.
[0069] The total power consumption is the sum of the power consumed by each ECU. The determination unit then calculates the power consumption of each of the first, second, and third on-board control devices based on the first execution duration and the second execution duration, and determines the execution start timing and execution period that minimizes the total power consumption. Specifically, the total power consumption is obtained by multiplying the power consumption of each ECU by the execution duration, adding up the results, and dividing by the execution period. If the execution periods of the first and second functions are different, the calculation is performed using the least common multiple of the execution periods of the first and second functions. In this way, power consumption can be easily calculated without actually measuring the voltage and current of the ECUs.
[0070] For example, assume that GW2 is 20 W (watts), ECU3a is 5 W, and ECU3b is 10 W. When the periphery monitoring function and vehicle information collection function are executed, the total power consumption of GW2, ECU3a, and ECU3b is 4.7 W (watts). Total power consumption = (0.2 × 5 + (0.2 + 0.3) × 20 + 0.3 × 10) / 3 = 4.7 W (watts).
[0071] Next, the determination unit 52 determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption.
[0072] Specifically, the determination unit 52 calculates the total power consumption by sequentially changing the execution start timing of the vehicle information collection function within the execution cycle, for example. Then, the determination unit 52 determines the period from the start of execution of the perimeter monitoring function, which results in the smallest total power consumption, to the start of the vehicle information collection function, which starts later. For example, the total power consumption is calculated when the vehicle information collection function starts 0 ms after the execution of the perimeter monitoring function. In this case, since the GW2 executes the perimeter monitoring function and the vehicle information collection function simultaneously, the execution duration of the GW2 is 0.3 ms. The total power consumption in this case is: Total power consumption = (0.2x5 + 0.3x20 + 0.3x10) / 3 = 3.3 W (watts). Figure 8 illustrates the operation when two functions are executed simultaneously. As shown in Figure 8, the overlapping execution of the perimeter monitoring function and the vehicle information collection function causes the periods during which the GW2s, which commonly execute the two functions, operate to overlap, reducing the actual execution duration of the GW2s. This reduces the total power consumption. The minimum power consumption occurs when the period during which the two functions are executed overlaps is the shortest.
[0073] The first information includes a first execution duration, which is the time from when the first function is started to when it is finished in the first execution cycle, and the second information includes a second execution duration, which is the time from when the second function is started to when it is finished in the second execution cycle. Specifically, as shown in FIG. 6 , the execution condition information includes an execution duration, which is the time from when the periodically executed function is started to when it is finished. For example, in the case of the perimeter monitoring function, the execution duration is, for example, 0.2 ms. In the case of the vehicle information collection function, the execution duration is, for example, 0.3 ms. Thus, the execution duration of the perimeter monitoring function is shorter than the execution duration of the vehicle information collection function. Therefore, there is a range in the overlap period between the shortest execution of the perimeter monitoring function and the execution of the vehicle information collection function. Specifically, the execution start timing of the vehicle information collection function, which is the time from when the perimeter monitoring function is started to when it is finished, is between -0.1 ms and 0 ms. When the execution start timing of the vehicle information collection function is between -0.1 ms and 0 ms, the overlap period of the two functions is constant at 0.3 ms. By providing such an execution duration, the execution start timing can be determined flexibly.
[0074] The above description is for the case where the execution period of the perimeter monitoring function and the execution period of the vehicle information collection function are the same, 3 ms. Next, the function of the determination unit 52 will be described for the case where the execution period of the perimeter monitoring function is different, for example, 2 ms and the execution period of the vehicle information collection function is 3 ms.
[0075] 9 is a diagram showing the operation in which two functions are executed at different execution cycles. As shown in FIG. 9, even if the execution start timing of the vehicle information collection function is determined to be 0 ms, the execution of the vehicle information collection function can be overlapped when the periphery monitoring function is executed for the first time, but the vehicle information collection function is not executed when the periphery monitoring function is executed for the second time, and therefore power consumption cannot be reduced.
[0076] Therefore, the determination unit 52 determines a first setting range, which is a range within which the first execution period should be limited, based on the first information, determines a first execution start timing and a first execution period based on the first setting range, determines a second setting range, which is a range within which the second execution period should be limited, based on the second information, and determines a second execution start timing and a second execution period based on the second setting range. The first setting range may be determined based on a first period initial value, which is an initial value of the period within which the first function is executed, and a first allowable range, which is an allowable range of change from the first period initial value. The second setting range may be determined based on a second period initial value, which is an initial value of the period within which the second function is executed, and a second allowable range, which is an allowable range of change from the second period initial value. The first setting range and the second execution range may be referred to as "setting ranges."
[0077] The first set range is a range within which the first execution period should be limited. The first set range is determined based on the first information. The first execution start timing and the first execution period are then determined based on the first set range. This allows the first execution start timing and the first execution period to be flexibly determined as long as they are within the first set range. The same applies to the second set range. As a result, when the periphery monitoring function is executed for the first time, the execution of the vehicle information collection function can be overlapped, and when the periphery monitoring function is executed for the second or subsequent times, the vehicle information collection function can be executed, thereby reducing power consumption.
[0078] FIG. 6 is a diagram showing an example of conditions for determining the execution start timing and the execution period. As shown in FIG. 6, for the perimeter monitoring function, the initial value of the execution period is 2 ms, and the allowable range for changing the execution period (the range of change allowed from the initial value) is ±1 ms. Therefore, the setting range for the perimeter monitoring function is 1 ms to 3 ms, and the execution period can be set within the range of 1 ms to 3 ms. On the other hand, for the vehicle information collection function, the initial value of the execution period is 3 ms, and the allowable range for changing the execution period (the range of change allowed from the initial value) is ±1 ms. Therefore, the setting range for the vehicle information collection function is 2 ms to 4 ms, and the execution period can be set within the range of 2 ms to 4 ms. As a result, the allowable ranges for the perimeter monitoring function and the vehicle information collection function overlap in the range of 2 ms to 3 ms.
[0079] 10 is a diagram showing the operation in which two functions are executed simultaneously in time with the same execution cycle. As shown in FIG. 10, by setting the execution cycle to, for example, 3 ms, the execution of the vehicle information collection function can be overlapped when the periphery monitoring function is executed for the first time, and the vehicle information collection function can also be executed when the periphery monitoring function is executed for the second or subsequent times.
[0080] However, the total power consumption is not the same in the range of execution cycles from 2 ms to 3 ms. For example, in an example where the perimeter monitoring function and the vehicle information collection function are executed, the total power consumption is 4.5 W when the execution cycle is 2 ms. Total power consumption = (0.2X5 + 0.3X20 + 0.2X10) / 2 = 4.5 W (watts). When the execution cycle is 3 ms, the total power consumption is 3.3 W. Total power consumption = (0.2X5 + 0.3X20 + 0.2X10) / 3 = 3.3 W (watts).
[0081] As such, the total power consumption varies depending on the execution period. Therefore, the determination unit 52 must determine the execution period and execution timing that minimize the total power consumption within the overlapping setting range. To determine the execution period and execution timing that minimize the total power consumption, for example, the execution period is sequentially changed within the setting range, and the execution start timing is sequentially changed within the changed execution period range, the total power consumption for each is calculated, and the combination of the execution period and execution start timing that minimizes the total power consumption is adopted. Note that the method for determining the execution period is not limited to this, and various methods, such as the gradient descent method, can be used.
[0082] [1-8. Operation of the Scheduling Device] The operation of the scheduling device according to the first embodiment will be described below. The scheduling device starts its operation, for example, when a new function is introduced to the in-vehicle system 1. The scheduling device also starts its operation when a new ECU is added to the in-vehicle system 1 and a new function is therefore introduced to the in-vehicle system 1. Alternatively, the scheduling device also starts its operation when an existing function is updated.
[0083] FIG. 11 is a flowchart illustrating an example of the operation of the scheduling device according to the first embodiment.
[0084] [1-8-1. Step S01] The acquisition unit 51 acquires first information for determining a first execution start timing, which is the timing at which a first function executed by the first in-vehicle control device and the second in-vehicle control device is started, and a first execution period, which is the period at which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first in-vehicle control device and the third in-vehicle control device is started, and a second execution period, which is the period at which the second function is executed (step S01). That is, the acquisition unit 51 acquires execution condition information.
[0085] The execution condition information is stored, for example, in a non-volatile memory of the memory 23 of the GW2. The control unit 22 reads the execution condition information stored in the memory 23 and acquires the execution condition information. The execution condition information may be stored for each function by, for example, an ECU that executes a function. Specifically, the execution condition information for the perimeter monitoring function may be stored in the ECU 3a, which is the image ECU, and the execution condition information for the vehicle information collection function may be stored in the GW2. In this case, the acquisition unit 51 acquires the execution condition information for the perimeter monitoring function from the ECU 3a and the execution condition information for the vehicle information collection function from the GW2. The execution condition information may be stored in a server outside the vehicle. In this case, the acquisition unit 51 accesses the server via a communication network to acquire the necessary execution condition information. If the scheduling device is implemented as a server, the acquisition unit 51 acquires the execution condition information directly from the device itself, without using a communication network. After the acquisition unit 51 acquires the execution condition information, the process proceeds to step S02.
[0086] [1-8-2. Step S02] Based on the first information and the second information, the determination unit 52 determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption of the first on-board controller, the second on-board controller, and the third on-board controller (step S02).
[0087] Specifically, for example, the determination unit 52 scans the execution period and the execution start timing within the set range, and adopts and determines the execution period and the execution start timing that result in the smallest total power consumption. After the determination unit 52 determines the execution start timing and the execution period, the scheduling device terminates its operation.
[0088] 12 is a flowchart showing an example of a routine for determining the execution start timing and execution period. The routine for determining the execution start timing and execution period shown in FIG.
[0089] [Step S021] In the execution start timing and execution period determination routine, the determination unit 52 first sets the execution period to the minimum value in the setting range and stores it in the memory 23. After storing it, the determination unit 52 proceeds to step S022.
[0090] [Step S022] Next, the determination unit 52 sets a predetermined value, for example, 0, to the start timing and stores it in the memory 23. After storing it, the determination unit 52 proceeds to step S023.
[0091] [Step S023] Next, the determination unit 52 calculates the total power consumption based on the set execution cycle and execution start timing, and stores the calculated total power consumption in the memory 23. After storing the calculated total power consumption, the determination unit 52 proceeds to step S024.
[0092] [Step S024] Next, the determination unit 52 changes the execution period and the execution start timing by a predetermined value. The value change is performed by changing one of the first execution period, the first execution start timing, the second execution period, and the second execution start timing by the predetermined value so as to cover the set range. The predetermined value is, for example, the greatest common divisor between the first execution period and the second execution period. If the first execution period is 2 ms and the second execution period is 3 ms, the predetermined step value is 1 ms. The predetermined step value is not limited to this and may be shorter, for example, 0.1 ms. After changing the first execution period, the first execution start timing, the second execution period, and the second execution start timing, the determination unit 52 proceeds to step S025.
[0093] [Step S025] Next, the determination unit 52 calculates the total power consumption based on the changed execution period and execution start timing. After calculating the total power consumption, the determination unit 52 proceeds to step S026.
[0094] [Step S026] Next, the determination unit 52 compares the total power consumption calculated this time (step S025) with the total power consumption stored in the memory 23. If the current total power consumption is smaller than the total power consumption stored in the memory 23 (YES in step S026), the determination unit 52 proceeds to step S027. On the other hand, if the current total power consumption is equal to or greater than the total power consumption stored in the memory 23 (NO in step S026), the determination unit 52 proceeds to step S028.
[0095] [Step S027] Next, the determination unit 52 stores the total power consumption calculated this time (calculated in step S025), the execution cycle and the execution start timing at that time, in the memory 23. After storing them, the determination unit 52 proceeds to step S028.
[0096] [Step S028] Next, the determination unit 52 determines whether the execution period and execution start timing cover the set range. If it is determined that they do not cover the set range, the process returns to step S024, where the total power consumption is calculated again while changing the execution period and execution start timing. On the other hand, if it is determined that they cover the set range, the determination unit 52 returns to the original routine.
[0097] [1-9. Summary] When the determination unit 52 executes steps S021 to S028, the determination unit 52 calculates the total power consumption while changing the execution period and the execution start timing within the set ranges between the first set range and the second set range, and each time a total power consumption smaller than the total power consumption stored in the memory 23 appears, the determination unit 52 stores the total power consumption, the execution period and the execution start timing at that time in the memory 23. As a result, when the execution of steps S021 to S08 is completed, the memory 23 stores the minimum total power consumption and the execution start timing and execution period corresponding to the minimum total power consumption.
[0098] Therefore, by executing steps S01 and S02, the scheduling device can determine the first execution start timing and the first execution period that minimize the total power consumption. This makes it possible to determine a schedule that can reduce the power consumption of the in-vehicle control device even if functions are added to the in-vehicle system 1 and the number of functions executed in parallel increases.
[0099] The above description deals with the case where the scheduling device is implemented in a gateway. However, the implementation is not limited to a gateway and may be implemented in an external server. When implemented in a gateway, the execution condition information, the determined execution start timing, and the execution period do not need to be transmitted and received via a communication network, and the execution start timing and the execution period can be determined in a short time. On the other hand, when implemented in an external server, the execution start timing and the execution period are determined by the external server, which has the advantage of not burdening vehicle hardware resources such as the memory area of the gateway. The external server may be an over-the-air (OTA) server whose software is updated via a wireless network.
[0100] <Embodiment 2> [2. Details of Embodiment 2 of the Present Disclosure] Details of Embodiment 2 of the present disclosure will be described below with reference to the drawings. In Embodiment 2, the scheduling device further includes a setting unit as a functional block, but other parts are the same as those in Embodiment 1. The same components as those in Embodiment 1 are assigned the same reference numerals, and descriptions of the same components, functions, and operations will be omitted.
[0101] [2-1 Configuration of the Scheduling Device] The configuration of the scheduling device of the second embodiment is the same as that of the first embodiment.
[0102] [2-2 Problems to be Solved by the Present Embodiment] In the second embodiment, a schedule that can reduce the power consumption of the on-board control device is set in the on-board system 1.
[0103] 13 is a functional block diagram showing an example of the functions of the scheduling device according to embodiment 2. In embodiment 2, the scheduling device 2 further includes a setting unit 53 as a functional block.
[0104] [2-3-1 Setting Unit] The setting unit sets the first execution start timing and the first execution period determined by the determination unit to the first in-vehicle control device and the second in-vehicle control device, and sets the second execution start timing and the second execution period determined by the determination unit to the first in-vehicle control device and the third in-vehicle control device.
[0105] Specifically, the first execution start timing, first execution period, second execution start timing, and second execution period determined by the determination unit 52 are stored, for example, in the memory 23. The setting unit 53 transmits the first execution start timing, first execution period, second execution start timing, and second execution period stored in the memory 23 to the ECU that executes the function via the communication I / Fs 13a, 13b and the communication buses 12a, 12b, with information indicating the first execution start timing, first execution period, second execution start timing, and second execution period included in a frame. The ECU that receives the transmitted frame extracts the information indicating the execution period and execution start timing included in the frame, and executes the function based on the extracted execution period and execution start timing.
[0106] When the function is to be executed by the device itself, information indicating the first execution start timing, the first execution period, the second execution start timing, and the second execution period is set in a predetermined location on the device itself. The device then executes the function based on the first execution start timing, the first execution period, the second execution start timing, and the second execution period set in the predetermined location. This allows the setting unit 53 to set the execution period and the execution start timing in the on-board control device.
[0107] [2-4 Operation of the Scheduling Device] Figure 14 is a flowchart showing an example of the operation of the scheduling device according to the second embodiment. The operation of the scheduling device according to the second embodiment will be described below. The operations from step S01 to step S02 are the same as those of the first embodiment, and therefore will not be described again. The second embodiment differs from the first embodiment in that in step S03, the setting unit 53 sets the execution period and the execution start timing in the ECU. After the determination unit 52 determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period, the scheduling device proceeds to step S03.
[0108] [2-4-1. Step S03] The setting unit 53 sets the first execution start timing and the first execution period determined by the determination unit 52 to the first in-vehicle control device and the second in-vehicle control device, and sets the second execution start timing and the second execution period determined by the determination unit to the first in-vehicle control device and the third in-vehicle control device.
[0109] Specifically, setting unit 53 transmits the first execution start timing, the first execution period, the second execution start timing, and the second execution period stored in memory 23 to the ECU that executes the function via communication I / Fs 13a, 13b and communication buses 12a, 12b, with information indicating the execution start timing and the execution period included in a frame. When the function is executed by the ECU itself, setting unit 53 sets the information indicating the execution start timing and the execution period in a predetermined location in the ECU itself.
[0110] In the case of the periphery monitoring function and the vehicle information collection function, the setting unit 53 sets a first execution period and a first execution start timing for the GW2 and the ECU 3a, and sets a second execution start timing and a second execution period for the GW2 and the ECU 3b. The ECU 3a executes the periphery monitoring function based on the set first execution start timing and first execution period. The ECU 3b executes the vehicle information collection function based on the set second execution start timing and second execution period. The GW2 executes the periphery monitoring function based on the first execution start timing and first execution period, and simultaneously executes the vehicle information collection function based on the second execution start timing and second execution period. After the setting unit 53 sets the execution period and the execution start timing for the GW2, the ECU 3a, and the ECU 3b, the scheduling device terminates its operation.
[0111] [2-4-2. Summary] The GW 2, the ECU 3a, and the ECU 3b execute the functions based on the first execution start timing, the first execution period, the second execution start timing, and the second execution period that are determined by the determination unit 52 so as to minimize the total power consumption. This makes it possible to suppress the power consumption of the in-vehicle control device even if functions are added to the in-vehicle system 1 and the number of functions executed in parallel increases.
[0112] <Third Embodiment> [3. Details of the Third Embodiment of the Present Disclosure] Details of the third embodiment of the present disclosure will be described below with reference to the drawings. The scheduling device of the third embodiment has the same functional blocks as the first embodiment. However, the function and operation of the determination unit 52 are partially different. The same components as those of the first embodiment are denoted by the same reference numerals, and descriptions of the same components, functions, and operations will be omitted.
[0113] [3-1 Configuration of the Scheduling Device] The configuration of the scheduling device of the third embodiment is the same as that of the first embodiment.
[0114] [3-2 Problems to be Solved by the Present Embodiment] For example, there are cases where a first function has a high priority and needs to be prevented from being executed in parallel with other functions. Furthermore, there are cases where a second function needs to start execution after the first function has been executed, based on the result of the first function. In such cases, even if the total power consumption is minimized, the first function and the second function cannot be executed simultaneously. In the third embodiment, an attempt is made to suppress the power consumption of the on-board control device even when such a restrictive condition exists.
[0115] [3-3 Functions of the Scheduling Device] The functional blocks of the scheduling device according to the third embodiment are the same as those of the first embodiment shown in Fig. 5. However, some of the functions of the determination unit 52 are different.
[0116] [3-3-1 Determination Unit] The first information includes information indicating a restriction condition under which execution of the first function is restricted, and the determination unit determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period while avoiding the restriction condition. The restriction condition may include a condition that restricts execution of the first function and the second function from overlapping in time. The restriction condition may also include at least one of a condition regarding a restriction on hardware resources used by the first function or a condition regarding a restriction on hardware resources used by the second function.
[0117] 15 is a diagram showing an example of execution condition information including restriction information. Unlike FIG. 6, this includes a condition restricting the execution of the first function and the second function at the same time. Specifically, a restriction condition that parallel operation is not permitted is added to the first function. Furthermore, a third function is added, but this has a restriction condition that it must be executed after the second function is completed.
[0118] The restriction condition of disabling parallel operation is set when the first function has a high priority and cannot be executed in parallel with other functions because delays are not allowed, etc. In this case, the timing for starting execution of the second function must be determined so that the second function starts execution after the first function is executed, or finishes execution before the first function is executed.
[0119] Furthermore, the restriction condition of disabling parallel operation may be at least one of a condition related to a restriction on the hardware resources used by the first function and a condition related to a restriction on the hardware resources used by the second function. For example, when performing very heavy processing, it is conceivable that the entire processing capacity of the ECU's CPU is used or more than 90% of the memory is used, in which case the execution of other functions is restricted. Also, in the case of a function that transmits and receives a large amount of image data via a communication bus, the communication capacity of the communication bus is used up, making it difficult to transmit and receive further data via the communication bus, and the execution of other functions is restricted.
[0120] The restriction condition of "execution after completion of the second function" is set when the third function needs to start execution in response to the result of the second function after the second function has been executed. For example, the second function collects information on various vehicle components, such as battery voltage and oil temperature, and the third function executes a vehicle self-diagnosis based on the information on various vehicle components collected by the second function. In this case, it is necessary to determine the timing for starting the execution of the third function so that the third function starts execution after the second function has been executed.
[0121] In the first embodiment, the total power consumption is calculated sequentially while changing the execution start timing and the execution period within a set range, and the determination unit 52 determines the execution start timing and the execution period within the set range that minimizes the total power consumption. In the third embodiment, in order to avoid restrictive conditions such as inability to operate in parallel and execution after completion of the second function, when changing the execution start timing and the execution period within the set range, the determination unit 52 determines whether the execution start timing and the execution period satisfy the restrictive conditions. If the restrictive conditions are satisfied, the execution start timing and the execution period are discarded to avoid the restrictive conditions. Then, the execution start timing and the execution period are changed to move on to the next candidate. On the other hand, if the restrictive conditions are not satisfied, the determination unit 52 continues the operation of calculating the total power consumption and subsequent operations.
[0122] 16 is a diagram illustrating an example of the order of execution of the first to third functions. Fig. 16 illustrates a state in which the second and third functions have been added and the scheduling device of the present disclosure has not yet begun operation. In the state illustrated in Fig. 16, the execution of the first function and the execution of the second function overlap, even though the first function has a restriction that they cannot be run in parallel. Furthermore, even though the third function has a restriction that they must be run after the second function is completed, the third function is executed before the second function is executed.
[0123] 17 is a diagram illustrating an example of the order of execution of the first to third functions. FIG. 17 illustrates a state after the second and third functions have been added and the operation of the scheduling device of the present disclosure has been completed. The determination unit 52 determines the execution start timing and execution period of each function while avoiding the restrictive conditions. As a result, the execution start timing of the second function is determined to be after the first function has been completed, with an execution period of 3 ms, and the execution start timing of the third function is determined to be after the second function has been completed, with an execution period of 3 ms. This makes it possible to avoid the restrictive conditions that the first function cannot be operated in parallel and that the third function must be executed after the second function has been completed.
[0124] [3-4 Operation of the Scheduling Device] Fig. 18 is a flowchart showing an example of the operation of the scheduling device according to the third embodiment. The operation of the scheduling device according to the third embodiment will be described below. The operations from step S021 to step S028 are the same as those in the first embodiment, and therefore will not be described again. Unlike the first embodiment, the third embodiment determines whether the execution start timing and execution period changed in step S024 satisfy the restriction conditions (step S029). After changing the execution start timing and execution period by a predetermined value, the determination unit 52 proceeds to step S029.
[0125] [3-4-1. Step S029] It is determined whether the execution start timing and execution period changed in step S024 satisfy the restriction conditions (step S029). Consider, for example, the case of determining the execution start timing of a second function. As shown in FIG. 15, the execution duration of the first function is 0.2 ms. The execution duration can be obtained by referencing the execution condition information shown in FIG. 15. Because the execution condition information includes information indicating the execution duration, even if there is a restriction condition that parallel operation is not possible, it is possible to set an execution start timing that allows the second function to start execution immediately after the first function ends. As a result, when the first function and the second function are executed by the same ECU, the ECU can continue to execute the second function after the first function ends without going through sleep or wake-up. As a result, processing time and power consumption can be reduced.
[0126] For example, if the perimeter monitoring function is provided with restriction information indicating that parallel operation is not permitted, the determination unit 52 determines that the restriction condition is met if the execution start timing of the vehicle information collection function is within a period of 0.2 ms from the start of execution of the perimeter monitoring function (YES in step S029), and proceeds to step S028. The determination unit 52 then determines whether the total power consumption has been calculated within the allowable range. Since step S027 is not executed, the execution start timing and execution period are not stored in the memory 23, and the execution start timing and execution period are not determined to be those with the minimum total power consumption.
[0127] On the other hand, if the execution start timing of the second function is 0.2 ms or later after the start of the execution of the first function, for example, 0.3 ms after the end of the first function, the determination unit 52 determines that the restriction condition does not apply (NO in step S029) and proceeds to step S025. In step S025, the determination unit 52 calculates the total power consumption.
[0128] [3-4-2. Summary] In this way, the determination unit 52 determines the execution start timing and execution period that avoid the limiting conditions and minimize the total power consumption. As a result, even if the limiting conditions exist, it is possible to suppress the power consumption of the on-board control device.
[0129] [4. Modifications] The above describes a case where the scheduling device operates under the partial network function. The scheduling device according to the present disclosure does not necessarily require the partial network function. Below, the operation modes and wake-up of the GW 2 and ECU 3 when not relying on the partial network function will be described.
[0130] Even in this case, the operation modes of the GW 2 and the ECU 3 include a normal mode and a sleep mode. In the normal mode, the GW 2 and the ECU 3 are in operation, and are capable of controlling the control target and communicating with GWs 2 and ECUs 3 other than the GW 2 and the ECU 3 themselves. In the sleep mode, the GW 2 and the ECU 3 are stopped except for some functions of the communication I / Fs 11a, 11b, 13a, and 13b.
[0131] When waking up an ECU, a frame including information specifying the ECU to be woken up is transmitted onto the communication buses 12a and 12b. The wake-up request, i.e., the frame including information specifying the ECU to be woken up, is transmitted, for example, by the ECU 3a. The ECU 3a is configured to store, for example, information indicating that the periphery monitoring function executed by the ECU 3a is executed by the ECU 3a and the GW2. Based on this information, the ECU 3a transmits a frame to the GW2 including information indicating that the frame is addressed to the GW2, which is the target ECU. The source of the frame is not limited to the ECU 3a, and the GW2 or the ECU 3b may transmit the frame.
[0132] The communication I / Fs 11a and 11b of the GW 2 and the communication I / Fs 13a and 13b of the ECU 3, which are in sleep mode, are configured to receive a frame and determine whether their own devices are specified in the frame. If their own devices are not specified, the GW 2 and the ECU 3 remain in sleep mode. If their own devices are specified, the communication I / Fs 11a, 11b, 13a, and 13b interrupt the control unit (processor) and instruct it to switch from sleep mode to normal mode. This wakes up the specified GW 2 and ECU 3.
[0133] On the other hand, the GW2 and ECU3 transition from normal mode to sleep mode when the execution of the function related to their own device is completed. That is, the GW2 and ECU3 are configured to receive a frame and transition from sleep mode to normal mode, and then transition back to sleep mode after a series of processes are completed. Therefore, the GW2 and ECU3 transition to sleep mode when frames are no longer received, and remain in sleep mode. The GW2 and ECU3 may be configured to transition to sleep mode after a predetermined period of time has elapsed after a series of processes are completed.
[0134] The transition to the sleep mode of the GW 2 and the ECU 3 is not limited to when a frame is no longer received. For example, the ECU 3 may be configured to transition to the sleep mode when a frame including a command to transition to the sleep mode is received.
[0135] When the system transitions from sleep mode to normal mode, the GW2 and ECU3 operate on a predetermined clock. In sleep mode, the clock stops, and the GW2 and ECU3 are stopped. Therefore, in normal mode, the power consumption by the GW2 and ECU3 is large. On the other hand, in sleep mode, the power consumption by the GW2 and ECU3 is small.
[0136] As described above, the ECU wakes up and transitions to sleep mode upon frame transmission and reception. The scheduling device of the present disclosure can also be implemented by an ECU that performs such operations.
[0137] [5-1. Supplementary Note 1] The present disclosure also provides the following in-vehicle system: An in-vehicle system including a scheduling device that schedules functions executed by multiple in-vehicle control devices that can communicate with each other via a communication bus, and the in-vehicle control devices connected to the communication bus, wherein the scheduling device includes an acquisition unit that acquires first information for determining a first execution start timing, which is the timing at which a first function executed by a first in-vehicle control device and a second in-vehicle control device is started, and a first execution period, which is the period at which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first in-vehicle control device and a third in-vehicle control device is started, and a second execution period, which is the period at which the second function is executed, based on the first information and the second information, and a determination unit that determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period so as to minimize the total power consumption of the first in-vehicle control device, the second in-vehicle control device, and the third in-vehicle control device. This allows the in-vehicle system to reduce power consumption of the in-vehicle control devices even when a large number of functions are executed in parallel.
[0138] [5-2. Supplementary Note 2] The present disclosure also relates to the following vehicle: A vehicle including a scheduling device that schedules functions executed by multiple on-board control devices that can communicate with each other via a communication bus, and the on-board control devices connected to the communication bus, wherein the scheduling device includes an acquisition unit that acquires first information for determining a first execution start timing, which is the timing at which a first function executed by a first on-board control device and a second on-board control device is started, and a first execution period, which is the period at which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first on-board control device and a third on-board control device is started, and a second execution period, which is the period at which the second function is executed, based on the first information and the second information, and a determination unit that determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period so as to minimize the total power consumption of the first on-board control device, the second on-board control device, and the third on-board control device. This makes it possible to reduce the power consumption of the on-board control devices in the vehicle even when a large number of functions are executed in parallel.
[0139] [5-3. Supplementary Note 3] The embodiments disclosed herein are illustrative in all respects and are not restrictive. The scope of the present invention is defined by the claims, not the above-described embodiments, and includes meanings equivalent to the claims and all modifications within the scope of the claims.
[0140] REFERENCE SIGNS LIST 1 In-vehicle system 2 GW (scheduling device) 3, 3a, 3b ECU (in-vehicle control device) 11a, 11b Communication I / F (communication interface) 12a, 12b Communication bus 13a, 13b Communication I / F (communication interface) 21 MCU (microcontroller unit) 22 Control unit 23 Memory 24 Internal bus 31 MCU (microcontroller unit) 32 Control unit (processor) 33 Memory 34 Peripheral circuit 41 Cluster table 51 Acquisition unit 52 Determination unit 53 Setting unit
Claims
1. A scheduling device that schedules functions to be executed by multiple in-vehicle control devices that can communicate with each other via a communication bus, comprising: an acquisition unit that acquires first information for determining a first execution start timing, which is the timing at which a first function executed by a first in-vehicle control device and a second in-vehicle control device is started, and a first execution period, which is the period in which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first in-vehicle control device and a third in-vehicle control device is started, and a second execution period, which is the period in which the second function is executed; and a determination unit that determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period based on the first information and the second information, so that the total power consumption of the first in-vehicle control device, the second in-vehicle control device, and the third in-vehicle control device is minimized.
2. The scheduling device of claim 1, further comprising a setting unit that sets the first execution start timing and the first execution period determined by the determination unit to the first in-vehicle control device and the second in-vehicle control device, and sets the second execution start timing and the second execution period determined by the determination unit to the first in-vehicle control device and the third in-vehicle control device.
3. The scheduling device of claim 1 or claim 2, wherein the determination unit determines a first setting range, which is a range to which the first execution period should be limited, based on the first information, determines the first execution start timing and the first execution period based on the first setting range, determines a second setting range, which is a range to which the second execution period should be limited, based on the second information, and determines the second execution start timing and the second execution period based on the second setting range.
4. The scheduling device described in claim 3, wherein the first set range is determined based on a first cycle initial value which is an initial value of the cycle in which the first function is executed and a first allowable range which is a range in which a change from the first cycle initial value is permitted, and the second set range is determined based on a second cycle initial value which is an initial value of the cycle in which the second function is executed and a second allowable range which is a range in which a change from the second cycle initial value is permitted.
5. The scheduling device of claim 4, wherein the first information includes a first execution duration which is the time from when the first function is started to when it is ended in the first execution period, and the second information includes a second execution duration which is the time from when the second function is started to when it is ended in the second execution period.
6. The scheduling device described in claim 5, wherein the determination unit calculates the power consumption of each of the first in-vehicle control device, the second in-vehicle control device, and the third in-vehicle control device based on the first execution duration and the second execution duration, and determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption.
7. A scheduling device as described in any one of claims 1 to 6, wherein the first information includes information indicating a restrictive condition under which execution of the first function is restricted, and the determination unit determines the first execution start timing, the first execution period, the second execution start timing, and the second execution period while avoiding the restrictive condition.
8. The scheduling device according to claim 7, wherein the restriction condition includes a condition that restricts execution of the first function and the second function from overlapping in time.
9. The scheduling device according to claim 7, wherein the restriction condition includes at least one of a condition regarding a restriction on a hardware resource used by the first function and a condition regarding a restriction on a hardware resource used by the second function.
10. A control method used by a scheduling device that schedules functions executed by multiple in-vehicle control devices that can communicate with each other via a communication bus, comprising the steps of: acquiring first information for determining a first execution start timing, which is the timing at which a first function executed by a first in-vehicle control device and a second in-vehicle control device is started, and a first execution period, which is the period in which the first function is executed, and acquiring second information for determining a second execution start timing, which is the timing at which a second function executed by the first in-vehicle control device and a third in-vehicle control device is started, and a second execution period, which is the period in which the second function is executed; and determining, based on the first information and the second information, the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption of the first in-vehicle control device, the second in-vehicle control device, and the third in-vehicle control device.
11. A control program used by a scheduling device that schedules functions executed by multiple in-vehicle control devices that can communicate with each other via a communication bus, the control program causing a computer to execute the following steps: acquiring first information for determining a first execution start timing, which is the timing at which a first function executed by a first in-vehicle control device and a second in-vehicle control device is started, and a first execution period, which is the period in which the first function is executed, and second information for determining a second execution start timing, which is the timing at which a second function executed by the first in-vehicle control device and a third in-vehicle control device is started, and a second execution period, which is the period in which the second function is executed; and determining, based on the first information and the second information, the first execution start timing, the first execution period, the second execution start timing, and the second execution period that minimize the total power consumption of the first in-vehicle control device, the second in-vehicle control device, and the third in-vehicle control device.
Citation Information
Patent Citations
Data processing apparatus
JP2015069521A
Illegality detection electronic control unit, car onboard network system, and illegality detection method
WO2016088304A1
