Statistical Model and Control of Residual Gas Mass in Gasoline Engines