Model Predictive Control Algorithms for Applications with millisecond timescales door