When a gas is compressed, its temperature rises; a diesel engine uses this property to ignite the fuel. Air is drawn into the cylinder of a diesel engine and is compressed by the moving piston at a compression ratio as high as 25:1, much higher than needed for a spark-ignition engine. At the end of the piston stroke, diesel fuel is injected into the combustion chamber at high pressure through an atomising nozzle. The fuel ignites directly from contact with the air, the temperature of which reaches 700-900 °C (1300-1650 °F). The combustion causes the gas in the chamber to heat up rapidly, which increases its pressure, which in turn forces the piston outward. The connecting rod transmits this motion to the crankshaft, which delivers rotary power at its output end. Scavenging (pushing the exhausted gas-charge out of the cylinder and drawing in a fresh draught of air) of the engine is done either by ports or valves. To significantly increase the efficiency of a diesel engine, a turbocharger to compress the intake air is often used. Use of an aftercooler/intercooler to cool the intake air after compression by the turbocharger further improves efficiency.
In cold weather, diesel engines can be difficult to start because the cold metal of the cylinder block and head draw out the heat created in the cylinder during the compression stroke, thus preventing ignition. Most Diesel engines use small electric heaters called glow plugs inside the cylinder to warm the cylinders prior to starting. Some even use resistive grid heaters in the intake manifold to warm the inlet air until the engine reaches operating temperature. Engine block heaters (electric resistive heaters in the engine block) plugged into the utility grid are often used when an engine is shut down for extended periods (more than an hour) in cold weather to reduce startup time and engine wear. Diesel fuel is also prone to 'waxing' in cold weather. This is when the fuel begins to solidify into a crystaline state. The crystals build up in the fuel system (especially the fuel filters), eventually starving the engine of fuel. Low-output electric heaters in fuel tanks and around fuel lines are used to solve this problem. Also, most engines have a 'spill return' system, by which any excess fuel from the injector pump and injectors is returned to the fuel tank. Once the engine is warmed up, this warm fuel will prevent waxing in the tank. Fuel technology has improved in recent years, with special additives preventing waxing in all but the coldest climates.
A vital component of older diesel engine systems is the governor, which limits the speed of the engine by controlling the rate of fuel delivery. Unlike in petrol (gasoline) engines, incoming air is not throttled and an engine without a governor can overspeed. Older injection systems were driven by a gear system from the engine and thus supplied fuel in proportion with engine speed. Modern, electronically controlled engines apply controls similar to those of petrol engines and limit the maximum RPM through an electronic control module (ECM) or electronic control unit (ECU)-the engine-mounted computer. The ECM/ECU receives an engine speed signal from a sensor and controls the amount of fuel and (start of injection) timing through electric or hydraulic actuators.
Controlling the timing of the start of injection of fuel into the cylinder is a key to minimizing emissions, and maximizing fuel economy (efficiency), of the engine. The timing is usually measured in units of crank angle of the piston before Top Dead Center (TDC). For example, if the ECM/ECU initiates fuel injection when the piston is 10 degrees before TDC, the start of injection, or timing, is said to be 10 deg BTDC. Optimal timing will depend on the engine design as well as its speed and load.
Advancing the start of injection (injecting before the piston reaches TDC) results in higher in-cylinder pressure and temperature, and higher efficiency, but also results in higher emissions of oxides of nitrogen (NOx) because of the higher temperatures. At the other extreme, delayed start of injection causes incomplete combustion. This results in higher particulate matter (PM) and unburned hydrocarbon (HC) emissions and more smoke.