Described and illustrated is a system for management of diabetes that includes an infusion pump, glucose sensor and controller with a method programmed in the controller. The infusion pump is configured to deliver insulin. The glucose sensor senses glucose levels in the subject and provide output signals representative of the glucose levels in the subject. The controller is programmed receives signals from at least one of the glucose sensor and the pump and configured to issue signals to the pump to deliver an amount of insulin determined by a feedback controller that utilizes a model predictive control based on desired glucose levels, insulin amount delivered and measured glucose levels of the subject. The controller is also configured to deliver insulin using a tuning factor (R) for a model predictive controller in the microcontroller as a conservative setting otherwise the system maintains a current tuning factor (R) for the controller.