NOVELTY - Controlling (m1) an internal combustion engine involves providing an internal combustion engine having an electronic controller for operating engine with first control loop closed on recirculation of exhaust gas and second control loop closed on the amount of fuel provided; operating the engine with a fuel that is blend of petroleum-based fuel and biomass-derived fuel; estimating the amount of biomass derived fuel with the controller; modifying operation of the first loop in response to the estimated amount; and modifying operation of the second loop in response to the estimated amount.    USE - For controlling an internal combustion engine (claimed).    ADVANTAGE - The closed-loop control strategy used in the present method eliminates biodiesel-induced nitrogen oxides (a smog generating chemical) increase, and reduces fuel consumption, while retains particulate matter (PM) reductions with variable biodiesel blend fractions in a manner requiring little or no added calibration effort. Also the present method enables the clean and efficient use of a renewable, domestically available fuel, so that emissions and noise are reduced and fuel consumption is minimized.    DETAILED DESCRIPTION - INDEPENDENT CLAIMS are included for the following:    (1) controlling (m2) internal combustion engine involving: providing an internal combustion engine having an electronic controller operating the engine with an electronically actuatable fuel injector; estimating the energy content of the fuel; and operating the engine to provide a predetermined amount of energy to the engine with the injector;    (2) controlling (m3) an internal combustion engine, involving: providing an internal combustion engine having at least one cylinder and an electronic controller for operating the engine; operating the engine with a fuel containing oxygen; estimating the rate of fuel flow into the engine with the controller; estimating the oxygen content of the fuel with the controller; estimating the rate of ambient air flow into the engine with the controller; calculating a number by the controller corresponding to the amount of combustible oxygen being provided to the cylinder; and modifying operation of the engine with the controller in response to the calculating;    (3) controlling (m4) an internal combustion engine involving providing an internal combustion engine and an electronic controller operating the engine with an electronically actuatable fuel injector; measuring the oxygen content of the exhaust gas; determining that the fuel includes a biofuel from the measuring; and compensating for the biofuel by injecting additional fuel into the engine;    (4) controlling (m5) an internal combustion engine involving providing an internal combustion engine having an intake manifold and an electronic controller operating the engine with an electronically actuatable fuel injector; estimating the rate of fuel flow into the engine with the controller; estimating the energy content of the fuel with the controller; estimating the rate of air flow into the intake manifold with the controller; and using the estimated fuel flow rate, estimated energy content, and estimated air flow rate and modifying operation of the engine by the controller with the injector; and    (5) controlling (m6) an internal combustion engine involving providing an internal combustion engine having at least one cylinder and an electronic controller operably connected to the engine to recirculate exhaust gas into the cylinder; operating the engine and producing exhaust gas; measuring the oxygen content of the exhaust gas from the engine by the controller; calculating a number by the controller corresponding to the amount of combustible oxygen being provided to the cylinder; and recirculating a quantity of exhaust gas into the cylinder in response to the calculating.