Electronic control device
The electronic control device adjusts high-priority task execution and corrects low-priority task timing to maintain consistent intervals despite interrupt tasks, addressing fluctuations in existing systems.
Patent Information
- Application Number
- JP2024086541
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2025-12-10
AI Technical Summary
Existing electronic control devices struggle to maintain consistent intervals for low-priority periodic tasks due to fluctuations caused by interrupt processing and the variable execution of high-priority tasks, particularly when interrupt tasks are executed.
An electronic control device that executes high-priority periodic tasks first, includes a decision unit to disable parts of these tasks if necessary, and corrects the start timing of low-priority tasks based on interrupt task execution, ensuring minimal fluctuations in execution intervals.
Minimizes variations in the time from the control period start to the execution of low-priority tasks by adjusting their start timing in response to interrupt tasks, maintaining consistent task intervals.
Smart Images

Figure 2025179649000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to an electronic control device that executes a periodic task every time a control period elapses and executes an interrupt task with priority over the periodic task. [Background technology]
[0002] For example, Patent Document 1 describes an electronic control device capable of adjusting the processing load of a calculation unit. In this electronic control device, data stored in RAM is updated by periodically executed calculation processing. Then, based on at least one of the amount of change in the updated value of the data and the amount of change in the time at which the data is updated, the execution or non-execution of data calculation in the calculation processing is switched. For example, when the amount of change in the updated value of the data is small or when the amount of change in the time at which the data is updated is equal to or greater than a predetermined time, the data calculation in the calculation processing is not executed, thereby reducing the processing load of the calculation unit.
[0003] The electronic control device described in Patent Document 1 executes a first task process and a second task process for each control cycle as calculation processes. If the calculation of data for the first task process is not executed, only an update process for updating the data update value and update time is executed in the first task process. The second task process is executed after the first task process. Therefore, if the calculation of data for the first task process is not executed, the update time of the data for the second task process, relative to the start of the control cycle, is advanced. Therefore, in the electronic control device described in Patent Document 1, if the calculation of data for the first task process is not executed, the update time of the second task process is corrected so as to be delayed by the change time caused by the non-execution. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Publication No. 2017-68802 Summary of the Invention [Problem to be solved by the invention]
[0005] However, the electronic control device of Patent Document 1 only corrects the update time of the second task processing. Therefore, the execution start time of the second task processing varies depending on whether or not the calculation of data for the first task processing is performed. Furthermore, the electronic control device of Patent Document 1 does not take into consideration fluctuations in the execution start time of the second task processing due to interrupt processing based on an interrupt signal from a sensor.
[0006] Therefore, when it is required that the second task processing be executed at as constant intervals as possible, that is, when it is required to suppress the fluctuation in the time from the start of the control cycle to the start of execution, the electronic control device of Patent Document 1 has the problem that it is difficult to meet such a requirement.
[0007] The present disclosure has been made in consideration of the above-mentioned points, and aims to provide an electronic control device that, when a high-priority periodic task and a low-priority periodic task are executed as periodic tasks for each control period, can minimize fluctuations in the time until the low-priority periodic task starts to execute, even if an interrupt task is executed. [Means for solving the problem]
[0008] In order to achieve the above object, an electronic control device (10) according to the present disclosure is an electronic control device (10) that executes a periodic task every time a control period elapses and executes an interrupt task with priority over the periodic task, The periodic tasks include high-priority periodic tasks and low-priority periodic tasks, and the low-priority periodic tasks are executed after the high-priority periodic tasks. a decision unit (S110) that decides whether or not to disable execution of at least a part of the high-priority periodic tasks; a determination unit (S150) that, when the determination unit determines that at least a part of the high-priority periodic tasks are not to be executed, determines whether an interrupt task has been executed in the control period in which at least a part of the high-priority periodic tasks are not to be executed; The system is configured to include a correction unit (S140, S160, S165) that corrects the start timing of the low-priority periodic task to a timing earlier than the timing at which all of the high-priority periodic tasks are assumed to be completed when the determination unit determines that an interrupt task has been executed in a control cycle in which at least a part of the high-priority periodic tasks are not executed.
[0009] With the above-described configuration, in the electronic control device of the present disclosure, in a control period in which an interrupt task is executed and at least a portion of the high-priority periodic task is not executed, the start timing of the low-priority periodic task is corrected to a timing earlier than the timing at which all of the high-priority periodic task is assumed to be completed. Therefore, even when the interrupt task is executed, the influence of the time required for the interrupt task on the start timing of the low-priority periodic task is reduced. As a result, even when the interrupt task is executed, it is possible to minimize the variation in the time from the start of the control period to the start of execution of the low-priority periodic task.
[0010] The reference numbers in parentheses above merely indicate an example of a correspondence with specific configurations in the embodiments described below, in order to facilitate understanding of the present disclosure, and are not intended to limit the scope of the present disclosure in any way.
[0011] Furthermore, the technical features of the present disclosure other than those described above will become apparent from the following description of the embodiments and the accompanying drawings. [Brief explanation of the drawings]
[0012] [Figure 1] 1 is a configuration diagram showing the configuration of an entire system including an electronic control device according to a first embodiment and a control target controlled by the electronic control device; [Figure 2] 5 is a timing chart for explaining correction of the start timing of a second periodic task in the electronic control device according to the first embodiment. [Figure 3] 4 is a flowchart showing a process for executing a first periodic task and a second periodic task in the electronic control device according to the first embodiment. [Figure 4] 10 is a flowchart showing a process for executing a first periodic task and a second periodic task in an electronic control device according to a second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0013] Hereinafter, embodiments of an electronic control device according to the present disclosure will be described with reference to the drawings. However, the present disclosure is not limited to the following embodiments, and various modifications described below are also included within the technical scope of the present disclosure. Furthermore, in addition to the following, various modifications can be implemented without departing from the gist of the present disclosure. The embodiments and various modifications can be implemented in appropriate combinations as long as no technical contradictions arise. In the following description, identical or similar components may be assigned the same reference numerals across multiple drawings, and their description may be omitted. Furthermore, when only a portion of a component is mentioned, the description provided elsewhere may apply to the other components.
[0014] (First embodiment) An electronic control device according to a first embodiment of the present disclosure will be described in detail below with reference to the drawings. Fig. 1 is a configuration diagram showing the configuration of an entire system including an electronic control device (hereinafter referred to as ECU) 10 according to this embodiment and a controlled object 20 controlled by the ECU 10.
[0015] The ECU 10 may be configured by a known computer. That is, the ECU includes a processor such as a CPU or a DSP, a memory for storing various types of information, an I / O circuit for communicating with the outside, and the like. Fig. 1 shows various functions of the ECU 10 in blocks. As shown in Fig. 1, the ECU 10 includes a processing unit 12, a monitoring unit 14, and a storage unit 16.
[0016] The processing unit 12 executes various tasks such as periodic tasks and interrupt tasks. Periodic tasks and interrupt tasks will be described in detail later. The processing unit 12 executes various tasks using a processor such as a CPU. The number of processors may be one, or two or more. The storage unit 16 corresponds to the memory described above and includes a non-volatile ROM or flash memory that stores programs for the various tasks executed by the processing unit 12. The storage unit 16 also includes a RAM that temporarily stores calculation values such as control data in the processing unit 12.
[0017] The monitoring unit 14 monitors whether the processing unit 12 is operating normally. The processing unit 12 executes a periodic task to periodically transmit an operation signal to the monitoring unit 14, indicating that the processing unit 12 is operating normally. The monitoring unit 14 determines that the processing unit 12 is operating normally while the processing unit 12 periodically transmits an operation signal. On the other hand, if the monitoring unit 14 does not receive a next operation signal from the processing unit 12 even after a predetermined time has elapsed since receiving the previous operation signal, it determines that some kind of abnormality has occurred in the operation of the processing unit 12. If the abnormality in the processing unit 12 continues, the monitoring unit 14 takes measures such as resetting the ECU 10.
[0018] The control object 20 is controlled by the ECU 10, and may be, for example, an engine mounted on a vehicle. When the control object 20 is an engine, the processing unit 12 of the ECU 10 executes periodic tasks to periodically calculate control data such as a fuel injection amount, a fuel injection timing, and / or an ignition timing. The calculated control data is recorded in the RAM of the storage unit 16 as a numerical value related to the control data. At that time, the recording time (recording time) at which the control data is recorded in the RAM is also recorded in the RAM. Note that the numerical value related to the control data recorded in the RAM may not be the control data itself, but may be data used to calculate the control data, or the like.
[0019] After calculating the control data, the ECU 10 outputs a drive signal to drive the fuel injection device so that the fuel injection device injects an amount of fuel corresponding to the calculated fuel injection amount at a timing corresponding to the calculated fuel injection timing. The ECU 10 also outputs a drive signal to the ignition device so that the ignition device ignites at a timing corresponding to the calculated ignition timing. In this manner, the operating state of the engine is controlled by the ECU 10. Note that, depending on the type of engine, if ignition control is not required, the control data may not include the ignition timing. Alternatively, the fuel injection device and the ignition device may be controlled by separate ECUs.
[0020] The sensor 22 detects data related to physical quantities (parameters) required for the ECU 10 to control the engine, which is the control target 20, and outputs the data to the ECU 10. The physical quantities required to control the engine include the engine rotation position, engine speed, intake air amount, accelerator opening, throttle opening, temperature, etc. For example, the sensor 22 may include a crank angle sensor as a sensor for detecting the rotation position of the engine. The crank angle sensor outputs a detection signal (pulse signal) every time the crankshaft rotates a predetermined angle. The ECU 10 (processing unit 12) can calculate the rotation position and rotation speed of the engine based on the detection signal from the crank angle sensor. If the engine has multiple cylinders, a cam angle sensor is provided to distinguish the cylinders.
[0021] Here, we will explain periodic tasks and interrupt tasks. The ECU 10 executes periodic tasks at each predetermined control period. The periodic tasks include a first periodic task corresponding to a high-priority periodic task and a second periodic task corresponding to a low-priority periodic task. The second periodic task is executed after the first periodic task is completed within each control period.
[0022] The first periodic task includes, for example, calculating control data for controlling an engine, which is the controlled object 20. The first periodic task may or may not include processing other than calculating the control data. If the first periodic task includes processing other than calculating the control data, the processing may be, for example, processing of storing updated values and update times of the control data in RAM, as described in Patent Document 1.
[0023] The second periodic task includes outputting an operation signal to the monitoring unit 14 indicating that the processing unit 12 is operating normally. The second periodic task may or may not include processing other than outputting the operation signal. The interrupt task may be triggered by, for example, receiving a detection signal from the sensor 22, and may include calculating a physical quantity (such as the engine rotational position) required to control the engine based on the detection signal. When the interrupt task is triggered, the processing unit 12 executes the interrupt task with priority over the periodic task.
[0024] For example, if the change in the operating state of the engine, which is the control target 20, is small, the amount or rate of change of a numerical value related to the control data calculated by executing the first periodic task at each control cycle may be smaller than a predetermined threshold. In this case, it can be said that there is little need for the processing unit 12 to calculate the control data at each control cycle. Therefore, in such a situation, the processing unit 12 can disable the calculation of the control data as at least a part of the first periodic task. By disabling the calculation of the control data, the processing unit 12 can reduce the processing load.
[0025] Therefore, in this embodiment, the processing unit 12 calculates the amount or rate of change of a numerical value related to the control data calculated for each control cycle, and compares it with a predetermined threshold value. If the amount or rate of change of the numerical value related to the control data is smaller than the predetermined threshold value, the processing unit 12 is configured to decide not to calculate the control data in the next control cycle.
[0026] However, if control data calculation is not performed, the execution time of the first periodic task, which has start timing T1 at the start of the control period, will be shortened by the time Tc during which control data calculation is not performed, as shown in Figure 2. Therefore, if the second periodic task is executed immediately after the completion of the first periodic task, as shown by the dotted line in Figure 2, the start timing T2 of the second periodic task (T2before in Figure 2), relative to the start of the control period, will be advanced. As a result, there is a possibility that the interval between the start timing T2 of the second periodic task in the previous and subsequent control periods and the start timing T2 of the second periodic task in the current control period will vary significantly.
[0027] When the second periodic task includes outputting an operation signal indicating that the processing unit 12 is operating normally to the monitoring unit 14, if the interval between the start timings T2 of the second periodic task varies significantly in successive control periods as described above, a situation may arise in which the operation signal is not input to the monitoring unit 14 for more than a predetermined time. This may cause the monitoring unit 14 to erroneously determine that the operation of the processing unit 12 is abnormal, even though the processing unit 12 is operating normally.
[0028] Therefore, in the ECU 10 according to this embodiment, in a control cycle in which calculation of control data for at least part of the first periodic task is not executed, the processing unit 12 corrects the start timing T2 of the second periodic task to timing T2after when it is assumed that the entire first periodic task has been completed, as shown by the solid line in Fig. 2. This makes it possible to prevent large fluctuations in the interval between the start timings T2 of the second periodic task in consecutive control cycles, even when the processing unit 12 does not execute calculation of control data for at least part of the first periodic task.
[0029] However, if the processing unit 12 always corrects the start timing T2 of the second periodic task to the timing T2after when all of the first periodic tasks are assumed to be completed in a control period in which the calculation of control data is not performed, the following problems may occur.
[0030] 2, even if an interrupt task is executed in a control cycle in which control data calculation is not executed, if the processing unit 12 corrects the start timing T2 of the second periodic task to the timing at which the first periodic task is assumed to be entirely completed (T2' before in FIG. 2), the start timing T2 of the second periodic task will be delayed by Tw, which is the waiting time for the interrupt task. Therefore, there is a risk that the interval between the start timings T2 of the second periodic tasks will vary greatly in consecutive control cycles.
[0031] Therefore, in the ECU 10 according to this embodiment, the processing unit 12 determines whether an interrupt task has been executed in a control period in which calculation of control data is not executed. If the processing unit 12 determines that the interrupt task has been executed, it corrects the start timing T2 of the second periodic task to a timing (T2' after in FIG. 2) that is earlier than the timing (T2' before in FIG. 2) at which the entire first periodic task is assumed to be completed. This reduces the effect of the time required for the interrupt task (the waiting time Tw for the interrupt task) on the start timing T2 of the second periodic task, even if the interrupt task has been executed. As a result, even if the interrupt task has been executed, it is possible to minimize fluctuations in the time from the start of the control period until the second task processing starts.
[0032] The process executed by the ECU 10 of this embodiment to correct the start timing T2 of the second periodic task will be described below with reference to the flowchart of Fig. 3. The process shown in the flowchart of Fig. 3 is repeatedly executed for each control period.
[0033] In step S100, the processing unit 12 of the ECU 10 reads from the storage unit 16 a determination result as to whether or not it is necessary to execute calculation of control data as at least a part of the first periodic task. The determination of whether or not it is necessary to execute calculation of control data in the first periodic task is performed in step S200, which will be described later, after the processing of the second task is completed. The result of the determination of whether or not it is necessary to execute calculation of control data in the first periodic task is recorded in the storage unit 16.
[0034] In step S110, the processing unit 12 determines whether the result of the determination of whether or not the control data calculation in the first periodic task needs to be performed indicates that the control data calculation needs to be performed or not. Step S110 corresponds to the determination unit of the present disclosure. If the determination result indicates that the control data calculation needs to be performed, the processing unit 12 proceeds to step S120. On the other hand, if the determination result indicates that the control data calculation does not need to be performed, the processing unit 12 proceeds to the processing of step S140.
[0035] In step S120, the processing unit 12 determines whether the start timing T1 of the first periodic task has arrived. If an interrupt task is not being executed in the current control cycle, the processing unit 12 determines that the timing corresponding to the start of the control cycle is the start timing T1 of the first periodic task. On the other hand, if an interrupt task is being executed in the current control cycle, the processing unit 12 determines that the timing at which the interrupt task is completed is the start timing T1 of the first periodic task. If the processing unit 12 determines in step S120 that the start timing T1 of the first periodic task has arrived, the processing proceeds to step S130. On the other hand, if the processing unit 12 determines that the start timing T1 of the first periodic task has not arrived, the processing unit 12 waits until the start timing of the first periodic task arrives. In step S130, the processing unit 12 executes a calculation process for the control data in the first periodic task.
[0036] In step S140, the processing unit 12 corrects the start timing T2 of the second periodic task to a timing assumed to be when the entire first periodic task is completed, rather than immediately after the completion of the first periodic task for which calculation of control data has been disabled. Step S140 corresponds to part of the correcting unit of the present disclosure. This prevents large fluctuations in the interval between the start timings T2 of the second periodic tasks in consecutive control periods, even when calculation of control data in the first periodic task has been disabled.
[0037] In step S150, the processing unit 12 determines whether an interrupt task is being executed in the current control cycle. Step S150 corresponds to the determination unit in the present disclosure. This determination may involve determining whether an interrupt task is being executed in the current control cycle, or determining whether the waiting time Tw due to the interrupt process is equal to or greater than a predetermined threshold time. Alternatively, when the first periodic task for which control data calculation is not performed ends, the processing unit 12 may determine whether the start timing T2 of the second periodic task, which is corrected in step S140 to the timing at which the entire first periodic task is assumed to have been completed, is delayed by a predetermined threshold time or more from the original start timing of the second periodic task. In either case, this is because it is possible to determine whether the start timing of the second periodic task is delayed by a predetermined threshold time or more from the timing at which the first periodic task is executed from the start of the control cycle and then entirely completed. Note that the original start timing of the second periodic task corresponds to the timing at which the first periodic task is executed from the start of the control cycle and then entirely completed. If it is determined in step S150 that interrupt processing is being executed in the current control cycle, the processing unit 12 proceeds to processing in step S160. On the other hand, if it is determined that interrupt processing is not being executed in the current control cycle, the processing unit 12 proceeds to processing in step S170.
[0038] In step S160, the processing unit 12 cancels the correction of the start timing T2 of the second periodic task performed in step S140. Step S160 corresponds to the remaining part of the correction unit of the present disclosure. As a result, the start timing T2 of the second periodic task is corrected to a timing (T2'after in FIG. 2) earlier than the timing (T2'before in FIG. 2) at which the entire first periodic task is assumed to be completed. In this case, the second periodic task starts immediately after the first periodic task ends. Therefore, if an interrupt task is executed in a control period in which control data calculation in the first periodic task is not executed, the effect of the waiting time Tw of the interrupt task on the start timing T2 of the second periodic task is reduced. As a result, even if the interrupt task is executed, it is possible to minimize fluctuations in the time from the start of the control period to the start of execution of the second task processing.
[0039] In step S170, the processing unit 12 executes a control data update process in which the control data calculated in the control data calculation process in step S130 and the data used to calculate the control data are recorded in RAM as numerical values related to the control data. Then, the ECU 10 drives the fuel injection device and the ignition device of the engine, which is the controlled object 20, based on the latest control data recorded in RAM. Furthermore, in the control data update process, the time at which the updated control data was updated is also recorded in RAM. Note that, if the calculation of the control data in the first periodic task is not performed, in step S170 the processing unit 12 records the same control data as the recorded control data in RAM and also records the update time in RAM. However, if the calculation of the control data in the first periodic task is not performed, the processing of step S170 may be omitted.
[0040] In step S180, the processing unit 12 determines whether the start timing T2 of the second periodic task has arrived. If it is determined that the start timing T2 of the second periodic task has arrived, the processing unit 12 proceeds to the processing of step S190. If it is determined that the start timing T2 of the second periodic task has not arrived, the processing unit 12 waits until the start timing of the second periodic task arrives. In step S190, the processing unit 12 executes the processing of the second periodic task.
[0041] In step S200, the processing unit 12 determines whether or not it is necessary to calculate the control data in the first periodic task. For example, the processing unit 12 calculates the amount of change or the rate of change of a numerical value related to the control data calculated for each control period and compares it with a predetermined threshold. If the amount of change or the rate of change of the numerical value related to the control data is smaller than the predetermined threshold, the processing unit 12 can decide not to calculate the control data in the next control period. Alternatively, the processing unit 12 may determine that it is necessary to calculate the control data when the number of times that calculation of the control data has been omitted reaches a predetermined number, or when the period during which calculation of the control data has not been omitted reaches a predetermined period. The result of the determination of whether or not it is necessary to calculate the control data in the first periodic task is recorded in RAM.
[0042] (Second embodiment) Next, an ECU 10 according to a second embodiment will be described with reference to the drawings. The configuration of the ECU 10 according to this embodiment and the configuration of the entire system including the ECU 10 are the same as those in the first embodiment, and therefore will not be described again.
[0043] The ECU 10 according to this embodiment differs from the ECU 10 according to the first embodiment in the method of correcting the start timing T2 of the second periodic task. Specifically, the ECU 10 according to the first embodiment corrects the start timing T2 of the second periodic task to a timing at which the first periodic task is assumed to have been completely completed in response to not executing the calculation of control data for the first periodic task. Then, if it is determined that an interrupt task is being executed in the current control cycle, the correction of the start timing T2 of the second periodic task is canceled. In this way, the start timing T2 of the second periodic task is corrected to a timing earlier than the timing at which the first periodic task is assumed to have been completely completed.
[0044] In contrast, in the ECU 10 according to the second embodiment, when it is determined that an interrupt task is being executed in a control period in which calculation of control data in the first periodic task is not executed, the start timing T2 of the second periodic task is corrected to a timing at which the first periodic task is predicted to be executed from the start of the control period and then completed in its entirety. Even in this manner, the start timing T2 of the second periodic task can be corrected to a timing earlier than the timing at which the first periodic task, which is started after the completion of the interrupt task, is predicted to be completed in its entirety.
[0045] 4 is a flowchart showing the processing executed by the ECU 10 of this embodiment, including processing for correcting the start timing T2 of the second periodic task. The processing in the flowchart of FIG. 4 is the same as that in the flowchart of FIG. 3 except for step S165, and therefore will not be described again.
[0046] In step S165, the processing unit 12 corrects the start timing T2 of the second periodic task to the timing at which the first periodic task is executed from the start of the control period and the first periodic task is predicted to be completely completed.
[0047] The above describes preferred embodiments of the present disclosure, but the present disclosure is not limited to the above-described embodiments and can be implemented in various modifications within the scope of the gist of the present disclosure.
[0048] For example, in the above-described embodiment, an example has been described in which the control object 20 is an engine. However, the control object 20 of the ECU 10 according to the present disclosure is not limited to an engine. In a case in which the ECU 10 needs to execute a periodic task and an interrupt task to control the control object 20 and it is necessary to suppress fluctuations in the execution interval of a second periodic task included in the periodic task, the control object 20 can be an engine.
[0049] The second periodic task may be a process other than outputting an operation signal indicating that processing unit 12 is operating normally. For example, the second periodic task may be a process for periodically communicating with another ECU or a process for periodically acquiring a sensor signal.
[0050] Furthermore, the flowcharts shown in the present disclosure are merely examples, and the number of steps constituting the flowcharts and the execution order of the processes can be changed as appropriate. Furthermore, the apparatus, system, and method described in the present disclosure may be implemented by a dedicated computer comprising a processor programmed to execute one or more functions embodied in a computer program. The apparatus, system, and method described in the present disclosure may be implemented using dedicated hardware logic circuits. The apparatus, system, and method described in the present disclosure may be implemented by one or more dedicated computers configured by combining a processor that executes a computer program with one or more hardware logic circuits. For example, some or all of the functions of the ECU 10 may be implemented as hardware. Implementations of certain functions as hardware include implementations using one or more integrated circuits (ICs). The processor may be a CPU, an MPU, a GPU, a data flow processor (DFP), or the like. Some or all of the functions of the ECU 10 may be implemented using any of a system-on-chip (SoC), an integrated circuit (IC), and a field-programmable gate array (FPGA). The concept of an IC also includes an ASIC (Application Specific Integrated Circuit). A computer program may be stored as instructions executed by a computer on a computer-readable non-transitory tangible storage medium. Examples of storage media for the program include a hard-disk drive (HDD), a solid-state drive (SSD), and flash memory. The scope of the present disclosure also includes a program for causing a computer to function as ECU 10, and a non-transitory tangible storage medium such as a semiconductor memory on which the program is stored. [Explanation of symbols]
[0051] 10: ECU 12: Processing section 14: Monitoring Department 16: Storage part 20: Control target 22: Sensor
Claims
1. An electronic control device (10) that executes a periodic task every time a control period elapses and executes an interrupt task with priority over the periodic task, the periodic tasks include a high-priority periodic task and a low-priority periodic task, and the low-priority periodic task is executed after the high-priority periodic task; a determination unit (S110) that determines whether or not to disable execution of at least a part of the high-priority periodic tasks; a determination unit (S150) that, when the determination unit determines that at least a part of the high-priority periodic tasks are not to be executed, determines whether the interrupt task is executed in a control period in which at least a part of the high-priority periodic tasks are not to be executed; and a correction unit (S140, S160, S165) that corrects the start timing of the low-priority periodic task to a timing earlier than the timing at which all of the high-priority periodic tasks are assumed to have been completed when the determination unit determines that the interrupt task has been executed during a control cycle in which at least a portion of the high-priority periodic tasks are not executed.
2. 2. The electronic control device according to claim 1, wherein, when the determination unit determines that the interrupt task has been executed in a control cycle in which at least a portion of the high-priority periodic task is not executed, the correction unit corrects the start timing of the low-priority periodic task to a timing at which it is assumed that all of the high-priority periodic task has been completed.
3. 3. The electronic control device according to claim 2, wherein, when the determination unit determines that the interrupt task has been executed in a control cycle in which at least a portion of the high-priority periodic task is not executed, the correction unit corrects the start timing of the low-priority periodic task to a timing earlier than the timing at which all of the high-priority periodic tasks are assumed to have been completed by canceling the correction to the timing at which all of the high-priority periodic tasks are assumed to have been completed.
4. 2. The electronic control device according to claim 1, wherein, when the determination unit determines that the interrupt task has been executed in a control cycle in which at least a portion of the high-priority periodic task is not executed, the correction unit corrects the start timing of the low-priority periodic task to a timing at which it is assumed that the high-priority periodic task has been executed from the start of the control cycle and that all of the high-priority periodic task has been completed.
5. 2. The electronic control device according to claim 1, wherein the determination unit determines that the interrupt task has been executed when it is predicted that the start timing of the low-priority periodic task will be delayed by a predetermined threshold time or more from the timing at which the high-priority periodic task is executed from the start of the control period and all of the high-priority periodic tasks are assumed to be completed.
6. a processing unit (12) that executes the periodic task and the interrupt task; a monitoring unit (14) that monitors the operation of the processing unit, The electronic control device according to claim 1 , wherein the low-priority periodic task includes sending a signal indicating that the processing unit is operating normally to the monitoring unit.
7. The high-priority periodic task includes calculating control data for controlling a control target (20), The electronic control device according to claim 6 , wherein the determination unit determines whether or not to not execute the calculation of the control data as at least a part of the high-priority periodic task.
8. 8. The electronic control device according to claim 7, wherein the decision unit decides not to calculate the control data when a change amount or a change rate of a numerical value related to the control data calculated for each control cycle is smaller than a threshold value.
Citation Information
Patent Citations
Electronic control device
JP2017068802A
Cited By
Interface system and corresponding method
US12578315B2