A method and apparatus for accurately determining TDC in a cylinder of an
internal combustion engine. Gas pressure is measured in the cylinder
relative to crank angle, giving rise to a curve of gas pressure with
crank angle. An offset is found by first computing the angular position
of an inflexion point of the compression pressure curve measured as a
function of the crank angle, and then computing the offset as the
difference between the angular position of a piston in the cylinder and a
theoretical value for said angular position of the piston dependent on a
known or measured flywheel angle. The value of TDC corrected by the
offset is then used to calculate a value of work output such as the
Indicated Mean Effective Pressure (IMEP) which may be used for diagnostic
and/or control purposes.