Determination of Residual Gas Fraction in IC Engines