Constrained model predictive control of hypnosis