Text this: Formulation of model predictive control algorithm for nonlinear processes