Patent ID: 7293555

Claim:
A controller for an internal combustion engine, comprising: an air flow meter that outputs a value responsive to an intake air amount, the intake air amount being an amount of air passing through an air intake passage of the internal combustion engine; an air-fuel ratio sensor that is disposed in an exhaust passage of the internal combustion engine, and detects an exhaust air-fuel ratio, the exhaust air-fuel ratio being an air-fuel ratio of gas passing through the exhaust air passage; an injector that injects fuel by opening a valve; an air flow meter approximator that approximates an output characteristic of the air flow meter using at least one first parameter; an injector approximator that approximates a fuel injection characteristic of the injector using at least one second parameter, a valve opening time determined that determines a valve opening time of the injector based on the value output by the air flow meter, the output characteristic of the air flow meter approximated by the air flow meter approximator, and the fuel injection characteristic of the injector approximated by the injector approximator, wherein the valve opening time is a time for injecting an amount of fuel required so that an air-fuel ratio of a gas mixture supplied to the internal combustion engine coincides with a target air-fuel ratio; a parameter determined that determines at least one first determined parameter and at least one second determined parameter, based on the exhaust air-fuel ratio detected by the air-fuel ratio sensor, so that the exhaust air-fuel ratio approaches the target air-fuel ratio; and a parameter setter that sets the at least one first determined parameter determined by the parameter determiner as the at least one first parameter used by the air flow meter approximator, and sets the at least one second determined parameter determined by the parameter determiner as the at least one second parameter used by the injector approximator.