Patent attributes
A controller for an engine includes processing circuitry. The processing circuitry executes an obtaining process that obtains a catalyst temperature, which is a temperature of a catalyst. The processing circuitry executes a setting process that sets a target air-fuel ratio that is a target value of an air-fuel ratio in the cylinder. The temperature of the catalyst at which an efficiency of nitrogen oxide reduction by the catalyst is the highest is referred to as a prescribed temperature. In the setting process, the processing circuitry sets the target air-fuel ratio to be higher when the catalyst temperature is a first value that is lower than the prescribed temperature, than when the catalyst temperature is a second value that is lower than or equal to the prescribed temperature and higher than the first value.