A control device for an internal combustion engine comprising:
- an initial target value determination means for determining a target value of a control amount of a first control object of an internal combustion engine as a first initial target value and determining a target value of a control amount of a second control object of the internal combustion engine as a second initial target value;
- an operation amount determination means for determining a first operation amount to be input to the first control object in accordance with a first control target value as a target value for controlling the control amount of the first control object and determining a second operation amount to be input to the second control object in accordance with a second control target value as a target value for controlling the control amount of the second control object;
- a first operation control means for controlling the operation of the first control object in accordance with the first operation amount determined by the operation amount determination means;
- a second operation control means for controlling the operation of the second control object in accordance with the second operation amount determined by the operation amount determination means;
- a correction target value output means for correcting the first initial target value and the second initial target value in accordance with a predetermined rule and outputting the respective corrected initial target values as a first correction target value and a second correction target value;
- and
- an estimation means for estimating the state of the internal combustion engine when the control amount of each of the control objects is controlled in accordance with the first operation amount and the second operation amount determined by the operation amount determination means by using the first initial target value and the second initial target value respectively as the first control target value and the second control target value, wherein:
- the first initial target value and the second initial target value are corrected by the correction target value output means so that the constraint condition is satisfied based on the state of the internal combustion engine estimated by the estimation means,
- each of the operation control means controls the operation of the corresponding control object, thereby the control amount of each of the control objects is controlled,
- in the case where a constraint condition related to the internal combustion engine is satisfied when the control amount of the first control object and the control amount of the second control object are controlled in accordance with the first operation amount and the second operation amount determined by the operation amount determination means by using the first initial target value and the second initial target value respectively as the first control target value and the second control target value, the first initial target value and the second initial target value are respectively input as the first control target value and the second control target value to the operation amount determination means, and
- in the case where a constraint condition related to the internal combustion engine is not satisfied when the control amount of the first control object and the control amount of the second control object are controlled in accordance with the first operation amount and the second operation amount determined by the operation amount determination means by using the first initial target value and the second initial target value respectively as the first control target value and the second control target value, the first initial target value and the second initial target value are repeatedly corrected in accordance with the predetermined rule by the correction target value output means so as to satisfy the constraint condition, the corrected initial target values are respectively output as a first correction target value and a second correction target value, and the first correction target value and the second correction target value output therefrom are respectively input as the first control target value and the second control target value to the operation amount determination means.