A stochastic logical system approach to model and optimal control of cyclic variation of residual gas fraction in combustion engines. (25th January 2016)