An engine control unit (ECU), also commonly called an engine control module (ECM), is a type of electronic control unit that controls a series of actuators on an internal combustion engine to ensure optimal engine performance.
It reads values from many sensors within the engine bay, interprets the data using multidimensional performance maps (called lookup tables), and adjusts the engine actuators.
Before ECUs, air-fuel mixture, ignition timing, and idle speed were mechanically set and dynamically controlled by mechanical and pneumatic means.