Described and illustrated is a system for management of diabetes that includes an infusion pump, glucose sensor and controller with a method programmed into the controller. The infusion pump is configured to deliver insulin to a subject. The glucose sensor is configured to sense glucose levels in the subject and provide output signals representative of the glucose levels in the subject. The controller is programmed to switchover from one mode of MPC control based on a predetermined range of blood glucose values to another MPC mode based on a predetermined target.