Nonlinear control of a hybrid batch reactor