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 to receive 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 and also configured to deliver at least the basal amount of insulin whenever the subject has initiated a manual bolus of insulin and a sensed or measured glucose level is at least a first threshold within a first duration of time.주입 펌프, 포도당 센서, 및 방법이 프로그래밍된 제어기를 포함하는 당뇨병 관리 시스템이 기술 및 예시된다. 주입 펌프는 대상에 인슐린을 전달하도록 구성된다. 포도당 센서는 대상 내의 포도당 수준을 감지하고 대상 내의 포도당 수준을 나타내는 출력 신호를 제공하도록 구성된다. 제어기는 포도당 센서 및 펌프 중 적어도 하나로부터 신호를 수신하도록 프로그래밍되고, 대상의 모델 예측 제어를 이용하는 피드백 제어기에 의해 결정된 인슐린의 양을 전달하도록 펌프에 신호를 발신하도록 구성된다.