This paper analyses the in-cylinder pressure oscillations in internal combustion engines, which are initiated by combustion and resonate during the expansion stroke. A specific mathematical tool, which takes into account the resonant frequency theory, has been developed to determine the resonance intensity evolution from the in-cylinder pressure signal.Two engines, a conventional spark-ignited (SI) engin modified to perform homogeneous charge compression ignition (HCCI) combustion, and a conventional compression ignited (CI) engine, were used to analyse the resonance excitation in various combustion modes at different operating conditions.The new transformation has been used to characterize resonance in various combustion modes and a previous method developed by the authors to estimate the trapped mass was fed by such knowledge to improve its robustness and accuracy.