Described and illustrated is a diabetes management system 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 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 of the subject.