Air Charge and Residual Gas Fraction Estimation for a Spark-Ignition Engine Using In-Cylinder Pressure