Feedback of real-time blood glucose data to an insulin pump for basal control

The first step in controlling an insulin pump based on continuous blood glucose data is to automatically control the basal rate of the insulin pump. When a bolus has not recently been performed, the pump can manage the blood glucose level by adjusting the basal rate as needed:
 * when the blood sugar is increasing, a small correction bolus can be automatically delivered and/or a higher basal rate can be temporarily set;
 * when the blood sugar is decreasing, the basal rate can be lowered or halted to deny the quantity of insulin needed to bring the blood glucose level back up until the basal rate can be continued at a new rate;
 * and with adaptive filtering techniques, the pump can "learn" the unique basal rates for the person as a function of the time of day.

When controlling the basal rate alone, the closed loop can still correct a meal bolus error that was too large or small for the food consumed by balancing the insulin on board with the CGMS feedback. The artificial pancreas algorithm must:
 * track insulin on board after a meal bolus,
 * know how much insulin is needed to bring BG values back in range after the meal,
 * recognize an imbalance between the insulin bolused and the insulin actually needed,
 * automatically bolus or increase the basal rate to correct a shortage of insulin,
 * automatically reducing or interrupting the basal rate to correct an abundance of insulin,
 * and using adaptive filtering techniques to "learn" the carbohydrate to insulin ratios for each meal bolus.