Scheduling device, control method, and control program
Patent Information
- Application Number
- JP2023051830
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2025-07-31
AI Technical Summary
【0008】 本開示によれば、並行して実行される機能が多くなっても、車載制御装置の消費電力の抑制を図ることができる。
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a scheduling device, a control method, and a control program. [Background technology]
[0002] A vehicle is equipped with various types of in-vehicle 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 when the sleep periods differ between multiple applications, a sleep control information acquisition means acquires information regarding the requested sleep period from each application individually, 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 the effective sleep period to control the sleep / wake-up of the hardware control entity. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2006-151007 A Summary of the Invention [Problem to be solved by the invention]
[0005] However, the automobile sleep control system of Patent Document 1 defines the effective sleep period as a period that is commonly included in the required sleep periods of each application, and as the number of applications executed in parallel increases, the sleep period becomes shorter, making it difficult to reduce power consumption. [Means for solving the problem]
[0006] A scheduling device according to one embodiment of the present disclosure is a scheduling device that schedules functions to be executed by multiple vehicle-mounted 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-mounted control device and a second vehicle-mounted 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 vehicle-mounted control device and a third vehicle-mounted 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 vehicle-mounted control device, the second vehicle control device, and the third vehicle control device is minimized.
[0007] The present disclosure can be realized not only as a scheduling device having the above-described characteristic configuration, a control method having steps corresponding to characteristic processes in the scheduling device, and a control program for causing the in-vehicle control device to execute the characteristic processes, but also as a part or all of the in-vehicle control device as a semiconductor integrated circuit. Effect of the Invention
[0008] According to the present disclosure, even if the number of functions executed in parallel increases, it is possible to suppress the power consumption of an on-board control device. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing an example of the configuration of an in-vehicle system including a scheduling device according to the first embodiment. [Diagram 2] FIG. 2 is a block diagram illustrating an example of the configuration of a GW according to the first embodiment. [Diagram 3] FIG. 3 is a block diagram illustrating an example of the configuration of the ECU according to the first embodiment. [Figure 4] FIG. 4 is an example of a cluster table indicating to which cluster an ECU belongs. [Diagram 5] FIG. 5 is a functional block diagram illustrating an example of the functions of the GW according to the first embodiment. [Figure 6] FIG. 6 is a diagram illustrating an example of information for determining an execution start timing and an execution period. [Figure 7] FIG. 7 is a diagram showing the operation when two functions are executed in parallel. [Figure 8] FIG. 8 is a diagram showing the operation when two functions are executed simultaneously in time. [Figure 9] FIG. 9 is a diagram showing the operation in which two functions are executed in different execution cycles. [Figure 10] FIG. 10 is a diagram showing an operation in which two functions are executed simultaneously in time with the same execution cycle. [Figure 11] FIG. 11 is a flowchart illustrating an example of the operation of the scheduling device according to the first embodiment. [Figure 12] FIG. 12 is a flowchart of an example of an execution start timing and execution cycle determination routine. [Figure 13] FIG. 13 is a functional block diagram illustrating an example of the functions of the scheduling device according to the second embodiment. [Figure 14] FIG. 14 is a flowchart illustrating an example of the operation of the scheduling device according to the second embodiment. [Figure 15] FIG. 15 is a diagram showing an example of execution condition information including restriction information. [Figure 16] FIG. 16 is a diagram showing an example of the execution order of the first to third functions. [Figure 17] FIG. 17 is a diagram showing an example of the execution order of the first to third functions. [Figure 18] FIG. 18 is a flowchart illustrating an example of the operation of the scheduling device according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] <Overview of the embodiment of the present disclosure> Below, an overview of the embodiments of the present disclosure will be listed and described.
[0011] (1) A scheduling device according to this embodiment is a scheduling device that schedules functions executed by a plurality of in-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 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, such that a 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. This makes it possible to reduce the power consumption of the on-board control device even if 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 suppress power consumption of the in-vehicle control devices even if the number of functions executed in parallel increases.
[0013] (3) In the above (1), the determination unit determines a first setting range, which is a range in 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 in 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 makes it possible to determine an execution period within a range in which the execution period of a function should be limited, and to execute the first function and the second function in an overlapping manner. As a result, even if the number of functions executed in parallel increases, it is possible to suppress power consumption of the in-vehicle control device.
[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 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 for which the second function is executed, and a second allowable range, which is a range within which a change from the second cycle initial value is permitted. 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, even if the number of functions executed in parallel increases, it is possible to suppress the power consumption of the in-vehicle control device.
[0015] (5) In the above (4), the first information includes a first execution duration that is a 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 that is a time from when the second function is started to when it is finished in the second execution cycle. This allows the first function and the second function to be executed with some overlap, allowing for flexible decision making.
[0016] (6) In the above (5), 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. This makes it possible to easily calculate the total power consumption.
[0017] (7) In the above (1), 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 in-vehicle control device even when there is a condition under which execution of a 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 vehicle 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 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. This makes it possible to calculate a schedule that can reduce power consumption of the in-vehicle control device even if there is a restriction on the hardware resource used by the function.
[0020] (10) A control method according to the present embodiment is a control method used by a scheduling device that schedules functions executed by a plurality of vehicle-mounted 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 vehicle-mounted control device and a second vehicle-mounted control device is started, and a first execution period, which is a period at which the first function is executed, and acquiring second information for determining a second execution start timing, which is a timing at which a second function executed by the first vehicle-mounted control device and a third vehicle-mounted 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 that minimize the total power consumption of the first vehicle-mounted control device, the second vehicle-mounted control device, and the third vehicle-mounted control device. This makes it possible to reduce the power consumption of the vehicle-mounted control devices even if the number of functions executed in parallel increases.
[0021] (11) A control program according to the present embodiment is a control program used by a scheduling device that schedules functions executed by a plurality of vehicle-mounted control devices that can communicate with each other via a communication bus, and causes a computer to execute 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 vehicle-mounted control device and a second vehicle-mounted 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 vehicle-mounted control device and a third vehicle-mounted 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 that minimize the total power consumption of the first vehicle-mounted control device, the second vehicle-mounted control device, and the third vehicle-mounted control device. This makes it possible to reduce the power consumption of the vehicle-mounted control devices even if the number of functions executed in parallel increases.
[0022] <Embodiment 1> [1. Details of the First Embodiment of the Present Disclosure] Hereinafter, the details of the embodiments 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 combination.
[0023] [1-1. In-vehicle systems] 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. Below, a gateway will be described as an example.
[0024] The in-vehicle system 1 according to the first embodiment includes a 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, an ECU 3a, an 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] A plurality of 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 state 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 GW2 is connected to each of the ECUs 3 via communication buses 12a and 12b such as a CAN (Controller Area Network) bus. Specifically, the GW2 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 GW2 can communicate with each of the ECUs 3 mutually.
[0027] Each of the ECUs 3 includes communication I / Fs 13a and 13b connected to the communication bus. The communication I / Fs 13a and 13b are compatible I / Fs compatible with the partial network function. When using the partial network function, the GW 2 and the ECU 3 use a communication protocol compatible with the partial network function. The communication protocol is, for example, CAN, CAN FD (CAN with Flexible Data Rate), or CAN PN (CAN with Partial Networking).
[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 has a function as a gateway that relays communication 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 GW2 will be described below.
[0031] 2 is a block diagram showing an example of the configuration of the GW2 according to the first embodiment. The GW2 has 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 by 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 CPUs (Central Processing Units). The processor included in the control unit 22 may be a GPU (Graphics Processing Unit). In this case, the control unit 22 reads out a computer program 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 has a volatile memory and a non-volatile memory, and stores various data. The volatile memory includes, for example, a RAM (Random Access Memory). The non-volatile memory includes, for example, a flash memory, an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a ROM (Read Only Memory). A part of the non-volatile memory may be provided outside the MCU 21.
[0035] The memory 23 stores, for example, in a non-volatile memory, computer programs, information for determining the execution timing of functions executed by an ECU described below, and various parameters. The memory 23 may 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 passing through the communication buses 12a and 12b via ports (not shown), respectively, and convert the signals into signals readable by the MCU 21. The communication I / Fs 11a and 11b are connected to the communication buses 12a and 12b, respectively. [1-3.ECU configuration] The hardware configuration of the ECU 3 will be described below.
[0037] 3 is a block diagram showing an example of the configuration of an 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 a similar configuration to 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 the partial network function by the control program.
[0040] The peripheral circuit 34 includes a serial communication circuit conforming to a standard such as UART, I2C, or SPI. 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 a signal output from the sensor and transmit a control signal 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 a partial network function.
[0042] [1-4. Cluster] FIG. 4 is an example of a cluster table indicating which cluster each ECU belongs to when the ECU belongs to a cluster. Clusters will be described 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 ECU 3 to the cluster to which each ECU 3 belongs. The cluster table 41 may be stored in each ECU 3.
[0043] Examples of functions executed by multiple 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] Surroundings monitoring is performed by the ECU 3a and GW2. Therefore, the image ECU and GW2 belong to the same cluster. The ECU 3a executes a function (first function a) of acquiring an image from an image sensor that captures the surroundings of the vehicle and transmitting a frame including the acquired image to the GW2. The GW2 executes a function (first function b) of receiving a frame including the image transmitted from the image ECU and recognizing a person from the received image.
[0045] The vehicle information collection function is executed by, for example, GW2 and ECU3b. Therefore, GW2 and ECU3b belong to the same cluster. GW2 executes a function (second function a) of receiving predetermined vehicle information from predetermined ECUs via communication buses 12a and 12b, respectively, and transmitting a frame including the received vehicle information to ECU3b. ECU3b, which is a TCU (Telematic control unit), executes a function (second function b) of receiving a frame including the vehicle information transmitted from GW2, and uploading 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, and the like.
[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 and ECU belong to the cluster in that row, and "0" indicates that the GW and ECU do not belong to the cluster in that row.
[0047] For example, GW2 and ECU3a belong to cluster PNC1. A first function, for example, a surroundings monitoring function, is executed by GW2 and ECU3a belonging to cluster PNC1. GW2 and ECU3b belong to cluster PNC2. A second function, for example, a vehicle information collection function, is executed by GW2 and ECU3b 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 operation of the GW 2 and the ECU 3 will now be described.
[0049] The operation modes of the GW2 and ECU3 include a normal mode and a sleep mode. In the normal mode, the GW2 and ECU3 are in operation, and can control the control target and communicate with the GW2 and ECU3 other than the own device. In the sleep mode, the GW2 and ECU3 are stopped except for some functions of the communication I / Fs 11a, 11b, 13a, and 13b. In CAN, when some clusters are woken up by the partial network function, a frame specifying the clusters to be woken up is transmitted onto the communication buses 12a and 12b. The wake-up request, i.e., the frame specifying the clusters to be woken up, is transmitted by, for example, 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, and the GW 2 or the ECU 3b may transmit the frame.
[0050] The communication I / Fs 11a and 11b of GW2 and the communication I / Fs 13a and 13b of ECU3, which are in sleep mode, receive a frame and determine whether or not the cluster to which the device belongs is specified in the frame. If the cluster to which the device belongs is not specified, GW2 and ECU3 maintain the 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 GW2 and ECU3 that belong to the specified cluster.
[0051] On the other hand, the GW2 and ECU3 transition from the normal mode to the sleep mode when the processing related to the function of the own device is completed. That is, the GW2 and ECU3 that receive a frame and transition from the sleep mode to the normal mode are configured to transition to the sleep mode after the series of processing is completed. Therefore, the GW2 and ECU3 transition to the sleep mode when the frame is no longer received, and maintain the sleep mode. The GW2 and 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 GW2 and the ECU3 is not limited to when a frame is no longer received. For example, the GW2 and the ECU3 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 mode shifts from sleep mode to normal mode, the GW2 and ECU3 operate on a specified 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 GW] FIG. 5 is a functional block diagram illustrating an example of the 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 Department] 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 vehicle control device and the 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 the third 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 in-vehicle control device and the second in-vehicle control device is, for example, a periphery monitoring function executed by an image ECU (ECU3a) that acquires images from an image sensor that captures the periphery of the vehicle and a GW2 that recognizes people from the acquired images. The second function executed by the first in-vehicle control device and the third in-vehicle control device is, for example, a vehicle information collection function in which the GW2 receives predetermined vehicle information from predetermined ECUs via the communication buses 12a and 12b, and the ECU3b, which is a TCU, 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 a common first in-vehicle control device.
[0058] The execution cycle is a cycle in which a function such as a periphery monitoring function is repeatedly executed. The periphery 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, ECU3a, wakes up at each execution cycle to execute the periphery monitoring function. The ECU3a wakes up when a timer contained in the ECU3a issues an interrupt to the ECU3a itself. A value such as 3 ms is set in the timer. The periphery monitoring function is executed every 3 ms, and in this case, 3 ms is a specific example of the execution cycle.
[0059] The execution start timing is the timing at which the execution of a function is started. The execution start timing is the timing at which the time indicated by the execution start timing has elapsed from the reference time. For example, when a master clock that governs the reference time of the entire vehicle is provided in one of the GW, ECU, or a server outside the vehicle, and the timer of each ECU is synchronized with the master clock, the reference time is the time when the master clock starts. Alternatively, when multiple functions are being executed, the reference time is the time when the execution of any function A of the multiple functions is started. Specifically, when the periphery monitoring function and the vehicle information collection function are executed, for example, the timer of the GW2 that executes the vehicle information collection function is started in synchronization with the time when the ECU3a that executes the periphery monitoring function starts the execution of the function. The execution start timing of the vehicle information collection function is set in the timer of the GW2. After the time indicated by the execution start timing has elapsed, the timer of the GW2 interrupts the GW2 itself, etc., to start the vehicle information collection function. As a result, the vehicle information collection function starts execution after the time indicated by the execution start timing of the vehicle information collection function has elapsed, based on the time when the execution of the periphery monitoring function is 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 in 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 in which the function is executed.
[0061] 6 is a diagram showing an example of information for determining an execution start timing and an execution cycle. Hereinafter, the first information for determining the first execution start timing and the first execution cycle, and the second information for determining the second execution start timing and the second execution cycle may be collectively referred to as "execution condition information." In addition, the first execution start timing and the second execution start timing may be collectively referred to as "execution start timing," and the first execution cycle and the second execution cycle may be collectively referred to as "execution cycle." The execution condition information is determined taking into consideration each function, and is, for example, information in a table format as shown in Fig. 6. The execution condition information lists information for determining the execution start timing and execution cycle of each function, in association with an identifier that identifies the function. The listed information includes, for example, the initial value of the execution cycle, the allowable range for changing the execution cycle, the execution duration, and the limiting conditions.
[0062] The initial value of the execution period is the typical initial value of the execution period required for the function to be executed to perform its function. The initial value of the execution period may be, for example, 2 ms or 3 ms. The allowable range of change of the execution period is the range within which the execution period can be changed from the initial value. The execution period required for the function to be executed to perform its function has a range, and the allowable range of change of the execution period indicates how far the execution period can be changed from the initial value. The allowable range of change of the execution period may be, for example, ±1 ms. Note that although 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 when a function executed in a specified execution period starts to when it ends. The execution duration may be, for example, 0.2 ms or 0.3 ms.
[0063] The limiting condition is a condition that limits the execution of a function. The condition that limits the execution of a function is specified according to the needs of the function, and may not be specified. The limiting condition is specified as information indicating that parallel operation is not possible, for example, so that the function has a high priority and is not executed in parallel with other functions. Alternatively, when a second function starts to execute in response to the result of a first function after the execution of a first function is completed, the limiting condition of the second function is specified as information indicating that the second function is executed after the first function is completed. Note that, when the limiting condition is not specified, the execution start timing and the execution period are determined based on the initial value of the execution period and the allowable range of the execution period change.
[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 out the execution condition information stored in the memory 23 and acquires the execution condition information. The execution condition information may be stored, for example, by an ECU that executes a function, for each function. Specifically, the execution condition information of the periphery monitoring function may be stored by the ECU3a, which is an image ECU, and the execution condition information of the vehicle information collection function may be stored by the GW2. In this case, the acquisition unit 51 may acquire the execution condition information of the periphery monitoring function from the ECU3a, and the execution condition information of 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. In the case where the scheduling device is realized 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. Decision section] 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 vehicle control device, the second vehicle control device, and the third vehicle control device.
[0066] The GW and each ECU consume a certain amount of power to execute a certain function. For example, GW2 consumes 20W (watts), ECU3a consumes 5W, and ECU3b consumes 10W. Here, the power consumption does not have to be the actual power consumption, but may be the relative value of the power consumption of each ECU. This is because even relative values can be compared. For example, GW2 consumes 4, ECU3a consumes 1, and ECU3b consumes 2.
[0067] FIG. 7 is a diagram showing the operation when two functions are executed in parallel. Surroundings monitoring by an image sensor is executed by ECU3a and GW2. ECU3a executes the function of acquiring an image from an image sensor that captures the surroundings of the vehicle, and transmitting a frame including the acquired image to GW2. This is the part 71a shown in FIG. 7. GW2 receives a frame including an image transmitted from the image ECU, and GW2 wakes up by receiving the frame. The woken up GW2 executes the function of recognizing a person from the received image. This is the part 71b shown in FIG. 7. As shown in FIG. 7, the surroundings 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 GW2 and ECU3b. GW2 executes a function of receiving predetermined vehicle information from predetermined ECUs through communication buses 12a and 12b, respectively, and transmitting a frame including the received vehicle information to ECU3b. This is the part 72a in FIG. 7. ECU3a receives the frame including the vehicle information transmitted from GW2, and ECU3b that has received the frame wakes up. The woken up ECU3b executes a function of uploading the received frame including the vehicle information to a server outside the vehicle. This is the 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 surroundings 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 vehicle control device, the second vehicle control device, and the third vehicle control device 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 them up, and dividing by the execution period. If the execution periods of the first function and the second function are different, the least common multiple of the execution periods of the first function and the second function is used for calculation. In this way, the power consumption can be easily calculated without actually measuring the voltage and current of the ECU.
[0070] For example, assume that the GW2 consumes 20 W (watts), the ECU3a consumes 5 W, and the ECU3b consumes 10 W. When the surroundings monitoring function and the vehicle information collection function are executed, the total power consumption of the GW2, the ECU3a, and the ECU3b is 4.7 W (watts). Total power consumption=(0.2X5+(0.2+0.3)X20+0.3X10) / 3 =4.7W (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, for example, sequentially changing the execution start timing of the vehicle information collection function within the range of the execution cycle. Then, the determination unit 52 determines the period from when the periphery monitoring function that results in the smallest total power consumption starts to when the vehicle information collection function that starts execution with a delay as the execution start timing. For example, the total power consumption is calculated when the vehicle information collection function starts execution 0 ms after the periphery monitoring function is executed. In this case, since GW2 executes the periphery monitoring function and the vehicle information collection function simultaneously, the execution duration of GW2 is 0.3 ms. In this case, the total power consumption is Total power consumption=(0.2X5+0.3X20+0.3X10) / 3 =3.3W (watts) Fig. 8 is a diagram showing the operation when two functions are executed simultaneously. As shown in Fig. 8, when two functions, a surroundings monitoring function and a vehicle information collection function, are executed in an overlapping manner, the period during which the GW2 that commonly executes the two functions operates overlaps, and the actual execution duration of the GW2 is reduced. This reduces the total power consumption. The minimum power consumption is achieved when the period during which the two functions are executed in an overlapping manner is the shortest.
[0073] Moreover, the first information includes a first execution duration which is a time from when the first function is started to when it is ended in the first execution cycle, and the second information includes a second execution duration which is a time from when the second function is started to when it is ended in the second execution cycle. Specifically, as shown in FIG. 6, the execution condition information includes an execution duration which is a time from when the function which is periodically executed is started to when it is ended. For example, in the case of the periphery monitoring function, the execution duration is, for example, 0.2 ms. In the case of the vehicle information collecting function, the execution duration is, for example, 0.3 ms. In this way, the execution duration of the periphery monitoring function is shorter than the execution duration of the vehicle information collecting function. Therefore, there is a width in the period during which the execution of the shortest periphery monitoring function and the execution of the vehicle information collecting function overlap. Specifically, the execution start timing of the vehicle information collecting function, which is the timing at which the execution of the vehicle information collecting function is started after the execution of the periphery monitoring function is started, is from -0.1 ms to 0 ms. When the execution start timing of the vehicle information collecting function is from -0.1 ms to 0 ms, the period during which the two functions are executed in an overlapping manner is constant at 0.3 ms. In this way, the existence of the execution duration allows the execution start timing to be flexibly determined.
[0074] The above describes the case where the execution period of the periphery monitoring function and the execution period of the vehicle information collecting function are the same, 3 ms. Next, the function of the determination unit 52 will be described when the execution period of the periphery monitoring function is different, for example, 2 ms and the execution period of the vehicle information collecting function is 3 ms.
[0075] Fig. 9 is a diagram showing an operation in which two functions are executed with 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 surroundings monitoring function is executed for the first time, but the vehicle information collection function is not executed when the surroundings monitoring function is executed for the second time, and power consumption cannot be reduced.
[0076] Therefore, the determination unit 52 determines a first setting range, which is a range in 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 in 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 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 allowed, and the second setting range may be 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 allowed. The first setting range and the second execution range may be referred to as "setting ranges".
[0077] The first setting range is a range in which the first execution period should be limited. The first setting range is determined based on the first information. Then, the first execution start timing and the first execution period are determined based on the first setting range. This allows the first execution start timing and the first execution period to be flexibly determined within the first setting range. The same applies to the second setting range. As a result, when the first surroundings monitoring function is executed, the vehicle information collection function can be overlapped, and when the second or subsequent surroundings monitoring function is executed, 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, in the case of the periphery monitoring function, the initial value of the execution period is 2 ms, and the allowable range of the execution period change (the range in which the change from the initial value is allowed) is ±1 ms. Therefore, the setting range of the periphery monitoring function is in the range of 1 ms to 3 ms, and the execution period is allowed to be determined in the range of 1 ms to 3 ms. On the other hand, in the case of the vehicle information collecting function, the initial value of the execution period is 3 ms, and the allowable range of the execution period change (the range in which the change from the initial value is allowed) is ±1 ms. Therefore, the setting range of the vehicle information collecting function is in the range of 2 ms to 4 ms, and the execution period is allowed to be determined in the range of 2 ms to 4 ms. As a result, the allowable range of the periphery monitoring function and the allowable range of the vehicle information collecting function overlap in the range of 2 ms to 3 ms.
[0079] Fig. 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, when the surroundings monitoring function is executed for the first time, the execution of the vehicle information collection function can be overlapped, and when the surroundings monitoring function is executed for the second or subsequent times, the vehicle information collection function can be executed.
[0080] However, the total power consumption is not the same when the execution cycle is between 2 ms and 3 ms. For example, when the surroundings 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.5W (watts) When the execution period is 3 ms, the total power consumption is 3.3W. Total power consumption=(0.2X5+0.3X20+0.2X10) / 3 =3.3W (watts)
[0081] In this way, the total power consumption changes depending on the execution period. Therefore, the determination unit 52 needs to determine the execution period and execution timing that minimizes the total power consumption within the overlapping setting range. To determine the execution period and execution timing that minimizes 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 the execution start timing that results in the minimum total power consumption is adopted. The method for determining the execution period is not limited to this, and various other 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. For example, the scheduling device starts its operation 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 introduced to the in-vehicle system 1 accordingly. 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 cycle, which is the cycle 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 cycle, which is the cycle at which the second function is executed (step S001). 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 out the execution condition information stored in the memory 23 and acquires the execution condition information. The execution condition information may be stored, for example, by an ECU that executes a function, for each function. Specifically, the execution condition information of the periphery monitoring function may be stored by the ECU3a, which is an image ECU, and the execution condition information of the vehicle information collection function may be stored by the GW2. In this case, the acquisition unit 51 acquires the execution condition information of the periphery monitoring function from the ECU3a, and acquires the execution condition information of 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. In the case where the scheduling device is realized as a server, the acquisition unit 51 acquires the execution condition information directly from the device itself, without going through 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 vehicle control device, the second vehicle control device, and the third vehicle control device (step S02).
[0087] Specifically, for example, the determination unit 52 scans the execution cycles and execution start timings within the set range, and adopts and determines the execution cycle and execution start timing that result in the smallest total power consumption. After the determination unit 52 determines the execution start timing and the execution cycle, the scheduling device ends 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 cycle determination routine, the determination unit 52 first sets the execution cycle to the minimum value of the set 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 it in the memory 23. After storing it, the determination unit 52 proceeds to step S024.
[0092] [Step S024] Next, the determination unit 52 changes the execution cycle and the execution start timing by a predetermined value. The value is changed by changing any one of the first execution cycle, the first execution start timing, the second execution cycle, and the second execution start timing by a predetermined value so as to cover the set range. The predetermined value is, for example, the greatest common divisor between the first execution cycle and the second execution cycle. When the first execution cycle is 2 ms and the second execution cycle 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 one execution cycle, the first execution start timing, the second execution cycle, 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 cycle 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, the determination unit 52 proceeds to step S028.
[0096] [Step S028] Next, the determination unit 52 judges whether the execution period and the execution start timing cover the set range. If it is judged that the execution period and the execution start timing do not cover the set range, the process returns to step S024, and the total power consumption is calculated again while changing the execution period and the execution start timing. On the other hand, if it is judged that the execution period and the execution start timing 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 obtains the total power consumption while changing the execution cycle and the execution start timing within the set ranges between the first and second set ranges, and every 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 cycle 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 minimum total power consumption and the execution start timing and execution cycle corresponding to the total power consumption are stored in the memory 23.
[0098] Therefore, by executing steps S01 to 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 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.
[0099] The above description is directed to a case where the scheduling device is implemented in a GW. However, the present invention is not limited to a GW, and the device may be implemented in a server outside the vehicle. When the device is implemented in a GW, 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 the device is implemented in a server outside the vehicle, the execution start timing and the execution period are determined by the server outside the vehicle, which has the advantage of not putting pressure on vehicle-side hardware resources such as the memory area of the GW. The server outside the vehicle may be an OTA (Over the Air) server in which software is updated via a wireless network.
[0100] <Embodiment 2> [2. Details of the Second Embodiment of the Present Disclosure] Hereinafter, the second embodiment of the present disclosure will be described in detail with reference to the drawings. In the second embodiment, the scheduling device further includes a setting unit as a functional block, but other parts are the same as those in the first embodiment. The same components as those in the first embodiment are denoted by 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 this 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] [2-3 Functions of the Scheduling Device] 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 section] The setting unit sets the first execution start timing and the first execution period determined by the determination unit to the first vehicle control device and the second vehicle control device, and sets the second execution start timing and the second execution period determined by the determination unit to the first vehicle control device and the third vehicle control device.
[0105] Specifically, the first execution start timing, the first execution cycle, the second execution start timing, and the second execution cycle determined by the determination unit 52 are stored, for example, in the memory 23. The setting unit 53 transmits the first execution start timing, the first execution cycle, the second execution start timing, and the second execution cycle stored in the memory 23 to an 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, the first execution cycle, the second execution start timing, and the second execution cycle included in a frame. The ECU that receives the transmitted frame extracts the information indicating the execution cycle and the execution start timing included in the frame, and executes the function based on the extracted execution cycle and execution start timing.
[0106] When the function is executed by the device itself, information indicating the first execution start timing, the first execution cycle, the second execution start timing, and the second execution cycle is set in a predetermined location of the device itself. The device itself executes the function based on the first execution start timing, the first execution cycle, the second execution start timing, and the second execution cycle set in the predetermined location. This allows the setting unit 53 to set the execution cycle and the execution start timing in the in-vehicle control device.
[0107] [2-4 Operation of the Scheduling Device] Fig. 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. 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 vehicle control device and the second vehicle control device, and sets the second execution start timing and the second execution period determined by the determination unit to the first vehicle control device and the third vehicle control device.
[0109] Specifically, the setting unit 53 transmits the first execution start timing, the first execution cycle, the second execution start timing, and the second execution cycle stored in the memory 23 to the ECU that executes the function via the communication I / Fs 13a and 13b and the communication buses 12a and 12b, with information indicating the execution start timing and the execution cycles being placed on a frame. When the function is executed in the own device, the setting unit 53 sets the information indicating the execution start timing and the execution cycle in a predetermined location in the own device.
[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 to the GW2 and the ECU3a, and sets a second execution start timing and a second execution period to the GW2 and the ECU3b. The ECU3a executes the periphery monitoring function based on the set first execution start timing and first execution period. The ECU3b 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 the first execution period, and at the same time executes the vehicle information collection function based on the second execution start timing and the second execution period. After the setting unit 53 sets the execution period and the execution start timing to the GW2, the ECU3a, and the ECU3b, the scheduling device ends its operation.
[0111] [2-4-2. Summary] The GW2, ECU3a, and ECU3b execute the function based on the first execution start timing, the first execution cycle, the second execution start timing, and the second execution cycle 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] <Embodiment 3> [3. Details of the Third Embodiment of the Present Disclosure] Hereinafter, the third embodiment of the present disclosure will be described in detail with reference to the drawings. The scheduling device of the third embodiment has the same functional blocks as those of the first embodiment. However, the functions and operations 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 the same components, functions, and operations will not be described.
[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 this embodiment] For example, there are cases where the first function has a high priority and needs not to be executed in parallel with other functions. Also, there are cases where the 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 an overlapping manner. In the third embodiment, even when such a restrictive condition exists, it is intended to suppress the power consumption of the in-vehicle control device.
[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 Decision Section] 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 by avoiding the limiting condition. The limiting condition may include a condition that limits execution of the first function and the second function from overlapping in time. The limiting condition may also include at least one of a condition regarding a limit on a hardware resource used by the first function or a condition regarding a limit on a hardware resource used by the second function.
[0117] Fig. 15 is a diagram showing an example of execution condition information including restriction information. Unlike Fig. 6, it includes a condition that restricts the first function and the second function from being executed at the same time. Specifically, a restriction condition that parallel operation is not possible is added to the first function. Also, a third function is added, but this has a restriction condition that it is 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 is not executed in parallel with other functions because delays are not allowed, etc. In this case, the timing of starting execution of the second function must be determined so that the second function starts execution after the first function is executed, or the second function finishes execution before the first function is executed.
[0119] The restriction condition of not being able to perform parallel operations may be 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. For example, when performing very heavy processing, it is possible 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. In addition, 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 restrictive condition of execution after completion of the second function is set in a case where the third function needs to start execution in response to the result of the second function after the execution of the second function is completed. For example, the second function collects information on each part of the vehicle, such as the battery voltage and oil temperature, and the third function executes a self-diagnosis of the vehicle based on the information on each part of the vehicle collected by the second function. In this case, it is necessary to determine the timing of starting the execution of the third function so that the execution of the third function starts after the execution of the second function is completed.
[0121] In the first embodiment, the total power consumption is calculated sequentially while changing the execution start timing and the execution period within the set range, and the determination unit 52 determines the execution start timing and the execution period within the set range in which the total power consumption is minimum. In the third embodiment, in order to avoid the restrictive conditions such as parallel operation not possible and execution after the 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 correspond to the restrictive conditions. If the restrictive conditions are met, 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 met, the determination unit 52 continues the operation after calculating the total power consumption.
[0122] Fig. 16 is a diagram of an example showing the order of execution of the first function to the third function. Fig. 16 shows a state before the scheduling device of the present disclosure starts operating after the second and third functions are added. In the state of Fig. 16, the execution of the first function and the execution of the second function overlap, even though the first function has a restrictive condition that parallel operation is not possible. Furthermore, even though the third function has a restrictive condition that execution is performed after the second function is completed, the third function is executed before the second function is executed.
[0123] FIG. 17 is a diagram of an example showing the order of execution of the first function to the third function. FIG. 17 shows a state after the second and third functions are added and the operation of the scheduling device of the present disclosure is completed. The determination unit 52 determines the execution start timing and execution period of each function while avoiding the limiting conditions. As a result, the execution start timing of the second function is determined to be after the first function is 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 is completed, with an execution period of 3 ms. This makes it possible to avoid the limiting condition that the first function cannot be operated in parallel and the limiting condition that the third function is executed after the second function is 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 the description will be omitted. Unlike the first embodiment, the third embodiment is different in that it determines whether or not the execution start timing and execution period changed in step S024 satisfy the restrictive 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 meet the limiting conditions (step S029). For example, consider a case where the execution start timing of the second function is determined. As shown in FIG. 15, the execution duration of the first function is 0.2 ms. The execution duration can be acquired by referring to the execution condition information shown in FIG. 15. Since the execution condition information has information indicating the execution duration, even if there is a limiting condition that parallel operation is not possible, it is possible to set an execution start timing that allows the execution of the second function to start immediately after the first function is completed. 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 is completed without going through sleep and wake-up. As a result, it is possible to reduce processing time and power consumption.
[0126] For example, since the periphery monitoring function is provided with restriction information indicating that parallel operation is not possible, 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 periphery monitoring function, the determination unit 52 determines that the restriction condition is met (YES in step S029) and proceeds to step S028. In step S028, the determination unit 52 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 are not determined to be the execution start timing and execution period with the minimum total power consumption.
[0127] On the other hand, if the timing of starting execution of the second function is 0.2 ms or later after the start of execution of the first function, for example, 0.3 ms after the end of the first function, it is determined that the limiting condition is not met (NO in step S029) and the process 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 condition and minimizes the total power consumption. As a result, even if the limiting condition exists, the power consumption of the in-vehicle control device can be suppressed.
[0129] [4. Modifications] The above describes the 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 mode and wake-up of the GW2 and ECU3 when not relying on the partial network function will be described.
[0130] Even in this case, the operation modes of the GW2 and the ECU3 include a normal mode and a sleep mode. The normal mode is a state in which the GW2 and the ECU3 are operating, and it is possible to control the control target and to communicate with the GW2 and the ECU3 other than the own device. The sleep mode is a state in which the GW2 and the ECU3 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 by, for example, the ECU 3a. The ECU 3a is configured to store, for example, information indicating that the peripheral monitoring function executed by the ECU 3a is executed by the ECU 3a and the GW2. Based on the information, the ECU 3a transmits a frame including information indicating that the frame is addressed to the GW2, which is the target ECU, to the GW2. 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 GW2 and the communication I / Fs 13a and 13b of the ECU3 in the sleep mode are configured to receive a frame and determine whether or not their own devices are specified in the frame. If their own devices are not specified, the GW2 and the ECU3 maintain the sleep mode as is. 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 the sleep mode to the normal mode. This wakes up the specified GW2 and ECU3.
[0133] On the other hand, the GW2 and ECU3 transition from the normal mode to the sleep mode when the execution of the function related to the device is completed. That is, the GW2 and ECU3 that transition from the sleep mode to the normal mode upon receiving a frame are configured to transition to the sleep mode after a series of processes are completed. Therefore, the GW2 and ECU3 transition to the sleep mode when the frame is no longer received, and maintain the sleep mode. The GW2 and ECU3 may be configured to transition to the 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 mode is changed from the sleep mode to the normal mode, the GW2 and the ECU3 operate on a predetermined clock. In the sleep mode, the clock stops and the GW2 and the ECU3 are stopped. Therefore, in the normal mode, the power consumption by the GW2 and the ECU3 is large. On the other hand, in the sleep mode, the power consumption by the GW2 and the ECU3 is small.
[0136] As described above, the ECU wakes up and transitions to a sleep mode by transmitting and receiving a frame. 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 includes the following in-vehicle system. An in-vehicle system including a scheduling device that schedules functions executed by a plurality of 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, the scheduling device including 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 in-vehicle control device and a second in-vehicle 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 in-vehicle control device and a third in-vehicle 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 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, based on the first information and the second information. This makes it possible to suppress the power consumption of the in-vehicle control devices even if the number of functions executed in parallel increases in the in-vehicle system.
[0138] [5-2. Supplementary Note 2] The present disclosure includes the following vehicles. A vehicle including a scheduling device that schedules functions executed by a plurality of 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, the scheduling device including 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 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. This makes it possible to suppress the power consumption of the on-board control devices even if the number of functions executed in parallel in the vehicle increases.
[0139] [5-3. Addendum 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 rather than the above-described embodiments, and includes the meaning equivalent to the claims and all modifications within the scope thereof. [Explanation of symbols]
[0140] 1. In-vehicle systems 2 GW (scheduling device) 3, 3a, 3b ECU (vehicle control unit) 11a, 11b Communication I / F (Communication Interface) 12a, 12b communication bus 13a, 13b Communication I / F (communication interface) 21 MCU (Microcontroller Unit) 22 Control section 23 Memory 24 Internal Bus 31 MCU (Microcontroller Unit) 32 Control unit (processor) 33 Memory 34 Peripheral circuits 41 Cluster Table 51 Acquisition Department 52 Decision Section 53 Setting section
Claims
1. A scheduling device that schedules functions to be executed by a plurality of on-board control devices that can communicate with each other via a communication bus, 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 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; 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, such that a 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; Equipped with Scheduling device.
2. 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, The scheduling device according to claim 1 .
3. the determination unit determines a first setting range, which is a range in 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 in 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. The scheduling device according to claim 1 .
4. the first set range is determined based on a first cycle initial value, which is an initial value of a cycle for which the first function is executed, and a first allowable range, which is a range within 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 a cycle for which the second function is executed, and a second allowable range, which is a range within which a change from the second cycle initial value is permitted. The scheduling device according to claim 3.
5. the first information includes a first execution duration that is a time from when the first function is started to when it is ended in the first execution cycle, and the second information includes a second execution duration that is a time from when the second function is started to when it is ended in the second execution cycle; The scheduling device according to claim 4.
6. the determination unit calculates 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. The scheduling device according to claim 5.
7. the first information includes information indicating a limiting condition under which execution of the first function is limited, 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. The scheduling device according to claim 1 .
8. the restriction condition includes a condition that restricts execution of the first function and the second function from overlapping in time. The scheduling device according to claim 7.
9. 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; The scheduling device according to claim 7.
10. A control method used by a scheduling device that schedules functions to be executed by a plurality of in-vehicle control devices that can communicate with each other via a communication bus, comprising: 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 at 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 at which the second function is executed; determining 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, such that a 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; Including, Control methods.
11. A control program used by a scheduling device that schedules functions to be executed by a plurality of on-board control devices that can communicate with each other via a communication bus, comprising: On the computer, 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 at 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 at which the second function is executed; determining 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, such that a 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; In order to execute Control program.