Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
SYSTEM AND METHODS FOR BOLUS DETERMINATION BASED ON GLUCOSE RATE OF CHANGE AND INSULIN ON BOARD JOINTLY WEIGHTED ZONE MODEL PREDICTIVE CONTROL
Document Type and Number:
WIPO Patent Application WO/2024/059261
Kind Code:
A1
Abstract:
The technology described here is directed to a system and method of determining a bolus insulin dose for a person with diabetes to address prolonged hyperglycemia. A bolus insulin dose for the person is output from a jointly weighted zone model predictive control. The algorithm has a cost function that minimizes predicted glucose deviation from the upper zone weighted by a joint function of predicted glucose rate-of-change (ROC) and insulin-on-board (IOB). The asymmetric weighting gradually increases when glucose ROC and IOB were jointly low, independent of glucose magnitude, to limit hyperglycemia while aggressively reduces the weight for negative glucose ROC to avoid hypoglycemia.

Inventors:
DESHPANDE SUNIL (US)
DOYLE FRANCIS J (US)
DASSAU EYAL (US)
Application Number:
PCT/US2023/032864
Publication Date:
March 21, 2024
Filing Date:
September 15, 2023
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
HARVARD COLLEGE (US)
International Classes:
A61B5/145; A61M5/172; G16H20/17; A61B5/00; A61M5/142
Foreign References:
US20220189602A12022-06-16
US20170143899A12017-05-25
US20220257857A12022-08-18
US20210209497A12021-07-08
US20220095968A12022-03-31
Attorney, Agent or Firm:
YOUNG, Alissa R. et al. (US)
Download PDF:
Claims:
Attorney Docket No: 002806-192450WOPT CLAIMS What is claimed herein is: 1. A system for managing glucose of a patient, the system comprising: an insulin pump configured to deliver insulin into a patient; a memory storing machine executable code; a control system coupled to the memory comprising one or more processors, the control system configured to execute the machine executable code to cause the control system to: determine an algorithmic weight as a joint function of glucose rate of change and insulin-on-board; apply the algorithmic weight in a model predictive control algorithm to determine an insulin dosage; update the insulin-on-board based on the determined insulin dosage; and send a command to the insulin pump to deliver the determined insulin dosage. 2. The system of claim 1, wherein the weight is determined at a periodic interval. 3. The system of claim 1, wherein the glucose rate of change is determined by periodic measurement of glucose from the patient. 4. The system of claim 3, further comprising a continuous glucose monitor attached to the patient or implanted in the patient, and the measurement of glucose from the patient is taken from the continuous glucose monitor. 5. The system of claim 3, wherein the measurement of glucose is taken from a blood fluid sample of the patient. 6. The system of claim 4, wherein the measurement is made at a periodic time, and the glucose velocity is calculated for that time. 7. The system of claim 1, wherein the insulin-on-board is determined from previous bolus dosages from the insulin pump and decay curves. 8. The system of claim 1, further comprising an insulin sensor, wherein the insulin-on-board is determined from the output of the insulin sensor. 9. The system of claim 1, wherein the algorithmic weight has a baseline value of 1, wherein the algorithmic weight is much less than 1 if negative glucose velocity falls below a first 36 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT threshold, and wherein the algorithmic weight is equal to 1 if positive glucose velocity is above a second threshold. 10. The system of claim 1, wherein the algorithmic weight is modulated around a baseline when the glucose velocity and insulin-on-board are low magnitude. 11. The system of claim 1, wherein the determined insulin dosage is bounded by time varying boundaries. 12. The system of claim 1, wherein the model predictive control algorithm includes a positive glucose velocity penalty term. 13. The system of claim 1, wherein an initial weight value is used to calculate a first dose of insulin, and wherein the initial injected insulin is initially used to determine the initial insulin on board for determining the algorithmic weight. 14. The system of claim 1, wherein the model predictive control algorithm is augmented with a user-requested feedforward insulin bolus based on an estimate of meal carbohydrate size based on input from the patient. 15. The system of claim 1, wherein the model predictive control algorithm is a glucose zone based model. 16. The system of claim 15, wherein the algorithmic weight is applied to a predicted glucose deviation from an upper zone term of the model predictive control algorithm. 17. A method of managing the glucose of a patient, the method comprising: determining a glucose rate of change in the patient; determining insulin-on-board in the patient; determining an algorithmic weight based on a joint function of the determined glucose rate of change and the insulin on board; applying the algorithmic weight in a zone model predictive control algorithm; determining an insulin bolus from the zone model predictive control algorithm; and sending a command to an insulin pump to deliver the insulin bolus. 18. The method of claim 17, wherein the weight is determined at a periodic interval. 19. The method of claim 17, wherein the glucose rate of change is determined by periodic measurement of glucose from the patient. 20. The method of claim 19, wherein the measurement of glucose from the patient is taken from a continuous glucose monitor attached to the patient or implanted in the patient. 37 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT 21. The method of claim 19, wherein the measurement of glucose is taken from a blood fluid sample of the patient. 22. The method of claim 20, wherein the measurement is made at a periodic time, and the glucose velocity is calculated for that time. 23. The method of claim 17, wherein the insulin-on-board is determined from previous bolus dosages from the insulin pump and decay curves. 24. The method of claim 17, wherein the insulin-on-board is determined from the output of an insulin sensor. 25. The method of claim 17, wherein the algorithmic weight has a baseline value of 1, wherein the algorithmic weight is much less than 1 if negative glucose velocity falls below a first threshold, and wherein the algorithmic weight is equal to 1 if positive glucose velocity is above a second threshold. 26. The method of claim 17, wherein the algorithmic weight is modulated around a baseline when the glucose velocity and insulin-on-board are low magnitude. 27. The method of claim 17, wherein the determined insulin dosage is bounded by time varying boundaries. 28. The method of claim 17, wherein the model predictive control algorithm includes a positive glucose velocity penalty term. 29. The method of claim 17, wherein an initial weight value is used to calculate a first dose of insulin, and wherein the initial injected insulin is initially used to determine the initial insulin on board for determining the algorithmic weight. 30. The method of claim 17, wherein the model predictive control algorithm is augmented with a user-requested feedforward insulin bolus based on an estimate of meal carbohydrate size based on input from the patient. 31. The method of claim 17, wherein the model predictive control algorithm is a glucose zone based model. 32. The method of claim 31, wherein the algorithmic weight is applied to a predicted glucose deviation from an upper zone term of the model predictive control algorithm. 33. A non-transitory machine readable medium having stored thereon instructions for performing a method comprising machine executable code which when executed by at least one machine, causes the machine to: 38 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT determine an algorithmic weight as a joint function of glucose rate of change and insulin- on-board; apply the algorithmic weight in a model predictive control algorithm to determine an insulin dosage; update the insulin-on-board based on the determined insulin dosage; and send a command to the insulin pump to deliver the determined insulin dosage. 39 4881-7752-5631.2 002806-192450WOPT
Description:
Attorney Docket No: 002806-192450WOPT SYSTEM AND METHODS FOR BOLUS DETERMINATION BASED ON GLUCOSE RATE OF CHANGE AND INSULIN ON BOARD JOINTLY WEIGHTED ZONE MODEL PREDICTIVE CONTROL PRIORITY [0001] This disclosure claims priority to and the benefit of U.S. Provisional Application No. 63/376,038, filed September 16, 2022. The contents of that application are hereby incorporated by reference in their entirety. TECHNICAL FIELD [0002] The technology described herein relates to methods of determining appropriate insulin delivery for maintaining a zone of control of glucose levels. STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH [0003] This invention was made with government support under DK104057 and DK113511 awarded by National Institutes of Health (NIH). The government has certain rights in this invention. BACKGROUND [0004] The following description includes information that may be useful in understanding the present invention. It is not an admission that any of the information provided herein is prior art or relevant to the presently claimed invention, or that any publication specifically or implicitly referenced is prior art. [0005] Diabetes is a metabolic disorder that afflicts tens of millions of people throughout the world. Diabetes results from the inability of the body to properly utilize and metabolize carbohydrates, particularly glucose. Hyperglycemia occurs when glucose levels are too high while hypoglycemia sets in when glucose levels are too low. Normally, the finely-tuned balance between glucose in the blood and glucose in bodily tissue cells is maintained by insulin, a hormone produced by the pancreas which controls, among other things, the transfer of glucose from blood into body tissue cells. Upsetting this balance causes many complications and pathologies including 1 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT heart disease, coronary and peripheral artery sclerosis, peripheral neuropathies, retinal damage, cataracts, hypertension, coma, and death from hypoglycemic shock. [0006] In patients with insulin-dependent diabetes, the symptoms of the disease can be controlled by administering additional insulin and other agents that have similar effects by injection or by external or implantable insulin pumps. The “correct” insulin dosage is a function of the level of glucose in the blood, insulin sensitivity and magnitude of disturbances acting on glucose. Ideally, insulin administration should be continuously readjusted in response to changes in blood glucose level. In diabetes management, “insulin” instructs the body’s cells to take in glucose from the blood. “Glucagon” acts opposite to insulin, and causes the liver to release glucose into the blood stream. The “basal rate” is the rate of continuous supply of insulin provided by an insulin delivery device (pump). The “bolus” is the specific amount of insulin that is given to raise blood concentration of the insulin to an effective level when needed (as opposed to continuous insulin supply). [0007] Exogenous insulin delivery is required for the management of type 1 diabetes (T1D) to mitigate hyperglycemia and glucose variability due to meal disturbance and basal requirements. With advances in device technology and closed loop algorithms, safe and effective glucose regulation is now increasingly possible. Among various considerations is prolonged hyperglycemia, a condition where glucose is elevated from the desired range longer than the natural dynamics, irrespective of the magnitude of difference from that desired range. This could occur due to systematic changes in insulin sensitivity due to circadian dynamics or physiological stressors, under delivery of insulin from mismatches in baseline profiles such as basal rates and insulin-to-carbohydrate ratios, limitations of the internal model for control, varying meal macronutrient composition, or a combination of these factors. [0008] For improved glucose regulation, while considering the fundamental trade-off between hyperglycemia and hypoglycemia regulation and inter-person variability, the changing requirements necessitate that a controller adapts on shorter time scales (hours) in the case of suboptimal control leading to prolonged hyperglycemia, as well as on longer time scales (weeks or months) for metabolic changes, such as, during pregnancy and adolescence. [0009] Presently, systems are available for continuously monitoring blood glucose levels by implanting a glucose sensitive probe into the patient. Such probes measure various properties of blood or other tissues, including optical absorption, electrochemical potential, and enzymatic 2 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT products. The output of such sensors can be communicated to a handheld device that is used to calculate an appropriate dosage of insulin to be delivered into the blood stream in view of several factors, such as a patient's present glucose level, insulin usage rate, carbohydrates consumed or to be consumed, and exercise, among others. These calculations can then be used to control a pump that delivers the insulin, either at a controlled basal rate, or as a bolus. When provided as an integrated system, the continuous glucose monitor, controller, and pump work together to provide continuous glucose monitoring and insulin pump control. [0010] Such systems at present require intervention by a patient to calculate and control the amount of insulin to be delivered. However, there may be periods when the patient is not able to adjust insulin delivery. For example, when the patient is sleeping, he or she cannot intervene in the delivery of insulin, yet control of glucose level is still necessary. A system capable of integrating and automating the functions of glucose monitoring and controlled insulin delivery would be useful in assisting patients in maintaining their glucose levels, especially during periods of the day when they are unable to intervene. A closed-loop system, also called an “artificial pancreas” (AP), consists of three components: a glucose monitoring device such as a continuous glucose monitor (“CGM”) that measures subcutaneous glucose concentration (“SC”); a titrating algorithm to compute the amount of analyte such as insulin and/or glucagon to be delivered; and one or more analyte pumps to deliver computed analyte doses subcutaneously. [0011] Model predictive control (MPC) is suited for closed-loop insulin delivery through a customized design of tractable receding-horizon minimization of a cost function addressing the aforementioned trade-off between subject to model predictions and critical safety constraints including nonnegativity of insulin values. For the shorter time scales, various adaptation and personalization schemes for MPC have been proposed featuring internal model update, time varying setpoints, augmented states and cost, and adaptive weights on the control and the output penalty. [0012] In some known zone model predictive control (MPC) approaches to regulating glucose, the MPC penalizes the distance of predicted glucose states from a carefully designed safe zone based on clinical requirements. This helps avoid unnecessary control moves that reduce the risk of hypoglycemia. The zone MPC approach was originally developed based on an auto-regressive model with exogenous inputs, and was extended to consider a control-relevant state-space model 3 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT and a diurnal periodic target zone. Specifically, an asymmetric cost function was utilized in the zone MPC to facilitate independent design for avoiding hyperglycemia and hypoglycemia. [0013] Throughout the development and adaptation of the MPC approaches, different controller adaptation methods have been utilized for artificial pancreas design. Earlier studies considered basal rate and meal bolus adaptation by using run-to-run approaches based on sparse blood glucose (BG) measurements. The availability of a CGM further provides the opportunity of designing adaptive AP utilizing advanced feedback controllers. For instance, a nonlinear adaptive MPC has been proposed to maintain normoglycemia during fasting conditions using Bayesian model parameter estimation. In other examples, a generalized predictive control (GPC) approach that adopted a recursively updated subject model has been employed on a bi-hormone AP; this approach has also been explored to eliminate the need of meal or exercise announcements. [0014] A model predictive iterative learning control approach has also been proposed to adapt controller behavior with patient’s day-to-day lifestyle. In some approaches, a multiple model probabilistic predictive controller was developed to achieve improved meal detection and prediction. A dynamic insulin-on-board approach has also been proposed to compensate for the effect of diurnal insulin sensitivity variation. A switched linear parameter-varying approach was developed to adjust controller modes for hypoglycemia, hyperglycemia and euglycemia situations. A run-to-run approach was developed to adapt the basal insulin delivery rate and carbohydrate-to- insulin ratio by considering intra- and inter-day insulin sensitivity variability. [0015] A major drawback in the proposed artificial pancreas designs is the difficulty in achieving satisfactory blood glucose regulation in terms of hyperglycemia and hypoglycemia prevention through smart control algorithms. [0016] As such there is a need for a model predictive control that may provide an optimal calculation to avoid prolonged hyperglycemia and hypoglycemia. There is also a need for a controller based on model predictive control for an insulin pump that automatically determines proper insulin delivery without intervention by a patient. There is a need for a control to a glucose range based on zone model predictive control that incorporates rate of change of glucose and insulin- on-board. 4 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT SUMMARY [0017] One example of the technology described herein is directed to a system for managing glucose of a patient. The system includes an insulin pump configured to deliver insulin into a patient and a memory storing machine executable code. The system includes a control system coupled to the memory having one or more processors. The control system is configured to execute the machine executable code to cause the control system to determine an algorithmic weight as a joint function of glucose rate of change and insulin-on-board. The control system executes the code to apply the algorithmic weight in a model predictive control algorithm to determine an insulin dosage. The control system executes the code to update the insulin-on-board based on the determined insulin dosage. The control system executes the code to send a command to the insulin pump to deliver the determined insulin dosage. [0018] A further implementation of the example system is where the weight is determined at a periodic interval. Another implementation is where the glucose rate of change is determined by periodic measurement of glucose from the patient. Another implementation is where the example system includes a continuous glucose monitor attached to the patient or implanted in the patient, and the measurement of glucose from the patient is taken from the continuous glucose monitor. Another implementation is where the measurement of glucose is taken from a blood fluid sample of the patient. Another implementation is where the measurement is made at a periodic time, and the glucose velocity is calculated for that time. Another implementation is where the insulin-on- board is determined from previous bolus dosages from the insulin pump and decay curves. Another implementation is where the example system includes an insulin sensor. The insulin-on- board is determined from the output of the insulin sensor. Another implementation is where the algorithmic weight has a baseline value of 1. The algorithmic weight is much less than 1 if negative glucose velocity falls below a first threshold, and the algorithmic weight equal to 1 if positive glucose velocity is above a second threshold. Another implementation is where the algorithmic weight is modulated around a baseline when the glucose velocity and insulin-on-board are low magnitude. Another implementation is where the determined insulin dosage is bounded by time varying boundaries. Another implementation is where the model predictive control algorithm includes a positive glucose velocity penalty term. Another implementation is where an initial weight value is used to calculate a first dose of insulin. The initial injected insulin is initially 5 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT used to determine the initial insulin on board for determining the algorithmic weight. Another implementation is where the model predictive control algorithm is augmented with a user- requested feedforward insulin bolus based on an estimate of meal carbohydrate size based on input from the patient. Another implementation is where the model predictive control algorithm is a glucose zone based model. Another implementation is where the algorithmic weight is applied to a predicted glucose deviation from an upper zone term of the model predictive control algorithm. [0019] Another example is a method of managing the glucose of a patient. A glucose rate of change in the patient and insulin-on-board in the patient are determined. An algorithmic weight based on a joint function of the determined glucose rate of change and the insulin on board is determined. The algorithmic weight is applied in a model predictive control algorithm. An insulin bolus is determined from the zone model predictive control algorithm. A command is sent to an insulin pump to deliver the insulin bolus. [0020] A further implementation of the example method is where the weight is determined at a periodic interval. Another implementation is where the glucose rate of change is determined by periodic measurement of glucose from the patient. Another implementation is where the measurement of glucose from the patient is taken from a continuous glucose monitor attached to the patient or implanted in the patient. Another implementation is where the measurement of glucose is taken from a blood fluid sample of the patient. Another implementation is where the measurement is made at a periodic time, and the glucose velocity is calculated for that time. Another implementation is where the insulin-on-board is determined from previous bolus dosages from the insulin pump and decay curves. Another implementation is where the insulin-on-board is determined from the output of an insulin sensor. Another implementation is where the algorithmic weight has a baseline value of 1. The algorithmic weight is much less than 1 if negative glucose velocity falls below a first threshold, and the algorithmic weight is equal to 1 if positive glucose velocity is above a second threshold. Another implementation is where the algorithmic weight is modulated around a baseline when the glucose velocity and insulin-on-board are low magnitude. Another implementation is where the determined insulin dosage is bounded by time varying boundaries. Another implementation is where the model predictive control algorithm includes a positive glucose velocity penalty term. Another implementation is where an initial weight value is used to calculate a first dose of insulin. The initial injected insulin is initially used to determine the initial insulin on board for determining the algorithmic weight. Another 6 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT implementation is where the model predictive control algorithm is augmented with a user- requested feedforward insulin bolus based on an estimate of meal carbohydrate size based on input from the patient. Another implementation is where the model predictive control algorithm is a glucose zone based model. Another implementation is where the algorithmic weight is applied to a predicted glucose deviation from an upper zone term of the model predictive control algorithm. [0021] Another example is a non-transitory computer readable medium having stored thereon instructions for performing a method comprising machine executable code which when executed by at least one machine, causes the machine to determine an algorithmic weight as a joint function of glucose rate of change and insulin-on-board. The code when executed by at least one machine causes the machine to apply the algorithmic weight in a zone model predictive control algorithm to determine an insulin dosage. The code when executed by at least one machine causes the machine to update the insulin-on-board based on the determined insulin dosage. The code when executed by at least one machine causes the machine to send a command to the insulin pump to deliver the determined insulin dosage. [0022] The above summary is not intended to represent each implementation or every aspect of the present disclosure. Additional features and benefits of the present disclosure are apparent from the detailed description and figures set forth below. BRIEF DESCRIPTION OF THE DRAWINGS [0023] The disclosure will be better understood from the following description of exemplary embodiments together with reference to the accompanying drawings, in which: [0024] FIG. 1 is a block diagram of an example individualized bolus calculator system and insulin pump; [0025] FIG.2 is a graph showing the interaction between glucose rate of change and insulin on board; [0026] FIG.3 a series of graphs of the asymmetric weighting as a function of glucose rate of change (ROC) and insulin-on-board (IOB); [0027] FIG.4A are graphs showing sample points and univariate weighting functions; [0028] FIG.4B is a table showing estimated parameters for the weighting surface generated by the graph in FIG.3; 7 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT [0029] FIG. 5 are graphs of simulated variability in meal sizes and simulated variability in meal time for simulations of the example model predictive control (MPC); [0030] FIG. 6 is a table showing outcomes from testing a first scenario in relation to the disclosed MPC based system; [0031] FIG.7A is plots of cumulative distribution function (CDF) and control-variability grid analysis (CVGA) for day and night time readings under the first scenario; [0032] FIG.7B is plots of CDF and CVGA for overnight time periods readings under the first scenario; [0033] FIG. 8 is a table showing outcomes from testing a second scenario in relation to the disclosed MPC based system; [0034] FIG.9A is plots of CDF and CVGA for day and night time readings under the second scenario; [0035] FIG. 9B is plots of CDF and CVGA for overnight time readings under the second scenario; [0036] FIG. 10 is a table of range outcomes from clinical studies using different version of zone MPC controllers; [0037] FIG.11A is a set of histograms taken during the day and night period during a clinical study; [0038] FIG.11B is a set of histograms taken during overnight period during the clinical study; [0039] FIG.12 is a set of plots taken from the use of an example controller using the example weighting during an induced stress session for an experimental participant; [0040] FIG. 13 is a set of plots taken from use of an example controller using the example weighting for an experimental participant; and [0041] FIG.14 is a flow diagram of an example routine of the example MPC based controller. DETAILED DESCRIPTION [0042] Unless defined otherwise, technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Szycher’s Dictionary of Medical Devices CRC Press, 1995, may provide useful guidance to many of the terms and phrases used herein. One skilled in the art will recognize many methods and materials similar or equivalent to those described herein, which could be used in the practice 8 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT of the present invention. Indeed, the present invention is in no way limited to the methods and materials specifically described. [0043] In some embodiments, properties such as dimensions, shapes, relative positions, and so forth, used to describe and claim certain embodiments of the invention are to be understood as being modified by the term “about.” [0044] Various examples of the invention will now be described. The following description provides specific details for a thorough understanding and enabling description of these examples. One skilled in the relevant art will understand, however, that the invention may be practiced without many of these details. Likewise, one skilled in the relevant art will also understand that the invention can include many other obvious features not described in detail herein. Additionally, some well-known structures or functions may not be shown or described in detail below, so as to avoid unnecessarily obscuring the relevant description. [0045] The terminology used below is to be interpreted in its broadest reasonable manner, even though it is being used in conjunction with a detailed description of certain specific examples of the invention. Indeed, certain terms may even be emphasized below; however, any terminology intended to be interpreted in any restricted manner will be overtly and specifically defined as such in this Detailed Description section. [0046] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of any inventions or of what may be claimed, but rather as descriptions of features specific to particular implementations of particular inventions. Certain features that are described in this specification in the context of separate implementations can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination. [0047] Similarly, while operations may be depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable 9 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT results. In certain circumstances, multitasking and parallel processing may be advantageous. Moreover, the separation of various system components in the implementations described above should not be understood as requiring such separation in all implementations, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products. [0048] The present disclosure is directed toward a system and a method for insulin delivery using a zone model predictive control (MPC) featuring an adaptive weighting scheme to address prolonged hyperglycemia due to change in insulin sensitivity, under delivery from profile mismatch, and meal composition. In the example MPC cost function, the penalty on predicted glucose deviation from the upper zone is weighted by a joint function of predicted glucose rate- of-change (ROC) and insulin-on-board (IOB). The asymmetric weighting gradually increases when glucose ROC and IOB are jointly low, independent of glucose magnitude, to limit hyperglycemia. The asymmetric weighting is aggressively reduced for negative glucose ROC to avoid hypoglycemia. The asymmetric weighting is designed to increase the weight > 1 only under conditions of low glucose ROC and IOB when additional insulin may be required during any cause of deviations from equilibrium conditions such as for later part of extended disturbance response. The example design also retains the feature of aggressive reduction in the weight ≪ 1 for negative glucose ROC values to avoid hypoglycemia. The continuous adaption scheme thus results in consistent improvement for the entire glucose range without incurring additional risk of hypoglycemia. [0049] FIG.1 is a block diagram of an example personalized bolus calculator system 100. The system 100 allows determination of individualized bolus calculations for a person with diabetes such as a patient 110. The system 100 includes a glucose concentration measuring device such as a continuous glucose monitor (CGM) 120 that is worn by the patient 110. In this example, the CGM 120 outputs continuous measurements of the blood glucose levels of the patient 110 in this example. An insulin pump 130 is also worn by the person 110. The insulin pump 130 supplies insulin in order regulate blood glucose levels of the patient 110. Alternatively, other insulin administration devices such as a connected insulin pen may be used. [0050] A controller 140 provides instructions to the pump 130 to provide insulin boluses to the patient 110. The controller 140 may include a control system that has one or more processors, memory and may include one or more control models, such as a zone model predictive control 10 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT (MPC) 142, stored on a memory that process glucose data output from the CGM 120 and feedback insulin provided data from the pump 130, and other data to determine a bolus size of insulin that needs to be delivered to the patient 110 and sends the instructions to the pump 130. Alternatively, other sensors may be used, such as an insulin level sensor that measures the insulin level in the patient 110. In the absence of the CGM 120, glucose levels may be determined by periodic testing of glucose by taking blood fluid samples. [0051] The memory is a machine readable medium that stores machine executable code in the form of an application. The controller 140 is a control system coupled to the memory. The controller 140 may include one or more processors. The application is executed by the controller 140 and executes machine executable code to cause the control system to determine a weight, Q, as a function of glucose rate of change and insulin-on-board. The weight is utilized in a zone model predictive control algorithm to determine an insulin dosage. [0052] The controller 140 may be in communication with the pump 130 by a wired or wireless connection. The controller 140 sends commands to the pump 130 to deliver the determined insulin dosage. The CGM 120 may be any suitable sensor for continuous glucose monitoring and may be an under the skin sensor with a wireless connection to the controller 140. In other examples, it may be a non-invasive sensor and have a wired or wireless connection to the controller 140, for instance the Dexcom G6 CGM system manufactured by Dexcom, Inc. [0053] The pump 130 may be any suitable insulin pump that is capable of receiving instructions from the controller 140 and delivering insulin boluses to the patient 110. For instance, the Medtronic MiniMed 670G is an artificial pancreas using a closed-loop system that includes an insulin pump. The pump 130 may also send a signal to the controller 140 indicating the amounts and times that insulin boluses are delivered to the patient 110. [0054] In this example, a mobile computing device 150 such as a smart phone carried by the patient 110 includes the controller 140, that may be a CPU, and a memory 144. As will be explained, the mobile computing device 150 may execute an application that incorporates the zone MPC 142 for the individual determination of bolus calculations and the control of the insulin pump 130. The mobile computing device 150 may include a communication interface such as a network transmitter receiver allowing communications to an external network such as the Internet or the Cloud 160 for upload of data related to the bolus calculation. It is to be understood that the bolus calculation described herein may be performed within applications running in the Cloud 160 in 11 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT conjunction, or in place of the mobile computing device 150. The availability of collected data as will be explained, may be accessed by other health care actors via the Cloud 160. Other communication interfaces such as NFC and Bluetooth may be employed for communication with external devices such as the CGM 120 and the insulin pump 130. [0055] The processor of the mobile computing device 150 may be conveniently implemented using one or more general purpose computer systems, microprocessors, digital signal processors, micro-controllers, application specific integrated circuits (ASIC), programmable logic devices (PLD), field programmable logic devices (FPLD), field programmable gate arrays (FPGA), and the like, programmed according to the teachings as described and illustrated herein, as will be appreciated by those skilled in the computer, software, and networking arts. [0056] The operating system software and other applications are stored on read only memory (ROM), random access memory (RAM) and a memory storage device such as the memory 144 for access by an applications processor. In this example, the memory 144 is flash memory, but other memory devices may be used. The data may also be stored off device such as in the Cloud 160. The applications stored on the memory storage devices in the mobile computer device 150 are instructions including machine executable code which when executed by a machine processor such as a controller cause the machine processor to perform application functions. In this example, the application may be preloaded on the mobile computer device 150 or may be offered as an application that may be downloaded to the mobile computer device 150 from a network device such as a server via a network. As explained above, parts or the entire application may be run on the Cloud 160. [0057] The memory 144 includes a non-transitory, machine-readable medium on which is stored one or more sets of instructions (e.g., software) embodying any one or more of the methodologies or functions described herein. The instructions may also reside, completely or at least partially, within memory 144, the ROM, the RAM, and/or within processors during execution thereof by the mobile computer device 150. The instructions may further be transmitted or received over a network via the network transmitter receiver. While the machine-readable medium is shown in an example to be a single medium, the term “machine-readable medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, and/or associated caches and servers) that store the one or more sets of instructions. The term “machine-readable medium” can also be taken to include any medium that is capable of storing, 12 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT encoding, or carrying a set of instructions for execution by the machine and that cause the machine to perform any one or more of the methodologies of the various embodiments, or that is capable of storing, encoding, or carrying data structures utilized by or associated with such a set of instructions. The term “machine-readable medium” can accordingly be taken to include, but not be limited to, solid-state memories, optical media, and magnetic media. [0058] Alternatively, the application may be executed by a controller on an insulin administration device such as the insulin pump 130. The insulin pump 130 in this example would have a communication interface to receive data from the CGM 120. In this case, the output of the application may be displayed to the user on either the pump 130 or on the mobile computer device 150. [0059] In the body, blood glucose values are tightly regulated in the presence of disturbances such as meal and exercise where insulin is the primary anabolic hormone to reject the meal disturbance by enabling glucose utilization and suppressing endogenous glucose production. Simulation models describing the effect of a meal and insulin on glucose can be constructed using interconnected compartments. Simplified equations of selected compartments from the UVA/Padova metabolic simulator are described in the following starting with the glucose subsystem: ^ ^ ^ ^^ ^^^ ൌ ^^ ^^ ^^^ ^^^ ^ ^^ ^^^ ^^^ െ ^^^ ^^^^ ^^^ ^ ^^ଶ ^^௧^ ^^^, (1) (2) where ^^ ^ and glucose production, ^^ ^^ is the glucose rate of appearance from meal and ^^ ^ௗ is insulin-dependent glucose utilization as described below, and ^^ are the virtual subject-specific rate parameters. The insulin subsystem can be described as: ^ ^^ ^ ൌ െ^ ^^ଶ ^ ^^ସ^ ^^^^ ^^^ ^ ^^^ ^^^ ^ ^^^^ ^^^^^ ^ ^^^ଶ ^^^^ଶ, (3) where Ip and mass in the subcutaneous compartment from delivered insulin, and ^^ and ^^ ^∗ are the virtual subject- specific rate parameters. The ^^ ^^ ^^ and ^^ ^ௗ terms can be described as: 13 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT ^ ^ ^^ ^^ ^ ^^ ^ ൌ ^^^^ െ ^^^ଶ ^^^ ^ ^^ ^ െ ^^^ଷ ^^ ^^ ^^ ^ , (4) ^^ ^ ^^ ^ ^^^బା^^^^^௧^^ீ^^௧^ (5) (6) where ^^ ^ is ^^ ^ is basal plasma , ଶ௨ ^^ , ^௫ , ^^ ^^ nonlinear (Michaelis–Menten) model parameters. Finally, the ^^ ^^ term is proportional to the nonlinear emptying rate of the stomach compartment as determined by: ^^ ^^^ ^^^ ∝ ^^ ^^^ ^ ^^ೌ^ି^^^^ ଶ ^ ^^ ^^ ^^ℎ^ ^^ ^௧^ ^^, (7) where ^^ is parameters. [0060] Prolonged hyperglycemia is induced by changing the following three sets of parameters: 1) Insulin sensitivity: ^^ ^௫ and ^^ ^ଷ are decreased to limit increase in utilization ^^ ^ௗ and decrease in production ^^ ^^ ^^; 2) Glucose effectiveness: ^^ ^^ and ^^ ^ଶ are decreased to limit the effect of glucose to intrinsically limit its own utilization at basal insulin, ^^ ^ௗ and production ^^ ^^ ^^; and 3) Meal rate of absorption: ^^ ^^^ and ^^ ^^௫ are decreased to limit the rate of meal appearance and extend the meal response. [0061] FIG.2 shows a graph 200 that shows plasma glucose ^^ ^ in mg/dL. FIG.2 also shows a graph 210 that shows plasma glucose rate of change (ROC) ^^ ^ ^ in mg/dL/min. A graph 220 shows insulin-on-board (IOB) approximated as ^^ ^^^ + ^^ ^^ଶ (with the baseline removed). A graph 230 shows a plane of mean glucose ROC with one standard deviation versus mean IOB. The graphs 200, 210, 220, and 230 show a comparison of trajectories from a cohort of 10 virtual subjects under nominal conditions as a solid line trace 250 and under resistance conditions as a dash dot line trace 252 shown as mean response. One standard deviation from the nominal conditions is shown as a shaded region 260. One standard deviation from the resistance conditions is shown as a shaded region 262. The graphs in FIG.2 show trajectories from open-loop simulation for 9 hours (sampled at 1 minute) with a 60 gram meal and optimal feedforward bolus based on nominal parameters. The simulations were performed for nominal parameters and for the aforementioned parameters multiplied by a factor of 0.75 to induced resistance. The parameter combinations induce a significance degree of resistance as observed by the difference in glucose 14 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT trajectories due to insufficient basal and bolus insulin. The IOB decay is not changed in either of the two scenarios as shown in the graph 220. Under nominal conditions, in the glucose ROC-IOB plane in graph 230, the trajectory starts and stays at the origin due to the correct nominal basal insulin. The trajectory jumps to the right along the IOB axis due to the feedforward bolus, after that the glucose ROC increases due to the meal, reaches its ROC peak, and eventually crosses the zero ROC threshold, which corresponds to the meal peak in the time domain, reaches the ROC trough that is much smaller than the peak, after that the trajectory converges back to the origin. [0062] In contrast, for the case of induced resistance, the trajectory drifts away from the origin along the ROC axis at beginning as the nominal basal insulin is not sufficient. As with nominal case, the trajectory jumps to the right from the same bolus, after that, however, it shows a slower glucose ROC and lower ROC peak compared to the nominal case, crosses the zero ROC threshold much later indicating delayed meal peak, and with a muted ROC trough converges back to the origin. These aspects are discussed in the context of controller design below. [0063] In practice, a controller for closed-loop insulin delivery such as the controller 140 in FIG. 1 operates in conditions ranging from no knowledge of meal disturbance to knowledge of meal carbohydrate content with an (optimal) feedforward bolus. Since insulin can only be added and cannot be removed, and given the lagged effect of insulin, it is useful to consider IOB as the amount of fast-acting insulin that has yet to have an effect. A zero IOB implies only basal insulin in the recent history. The direction of the effect of the meal disturbance and IOB on glucose can be ascertained by the glucose ROC which is a measure of the net movement of plasma glucose. In particular, negative glucose ROC has to be prioritized over positive glucose ROC to minimize the risk of hypoglycemia over hyperglycemia. [0064] MPC cost with glucose ROC or velocity ^^ weighting may be expressed as: ^ ே^ ^ ୀ^ ^ ^^^v ^ ^z^ ^ ^ z^ ^ ^ (8) where v is the by ^^ ^ ^^ ^ , which varies between 1 and 0 for negative velocities up to 1 mg/dL/min using a cosine function, z^ is deviation below the zone, and ^^ ∈ ℤ + is the prediction horizon in this simplified representation. [0065] The velocity weighting in Equation 8 avoids hypoglycemia by reducing insulin delivery smoothly to basal when the velocity is increasingly negative, in particular, following a meal peak. 15 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT A feature of prolonged hyperglycemia is eventual low glucose ROC with not enough IOB as shown in FIG.2. Thus, any increase in weight cannot be made only as a function of glucose ROC without the knowledge of IOB. With the goal of nudging glucose out of prolonged hyperglycemia, the weight is adapted jointly as a function of glucose ROC and IOB such that a higher cost is incurred in the low glucose ROC-IOB plane so that insulin delivery can be safely increased while backing off when either of the variables changes. Considering the asymmetric risks of hypoglycemia over hyperglycemia, the use of relatively shorter prediction horizon of 45 minutes compared to the natural glucose dynamics, and glucose ROC can be reliably estimated from CGM while IOB can only be estimated from recorded deliveries with no approved sensing device, the following three requirements can be mapped out for adapting weight ^^ from a baseline value of 1: 1) ^^ ≪ 1 if negative ^^ falls below a threshold, 2) ^^ = 1 if positive ^^ is above a threshold, 3) Modulate ^^ around the baseline if ^^ and IOB are of low magnitude. [0066] FIG.3 shows a first graph 300 of the asymmetric weighting ^^ as a function of glucose ROC ( ^^, mg/dL/min) and normalized IOB ( ^^ ^^ ^^ ^^, unitless). The projection plots in each of the two dimensions are shown in a graph 310 that shows ^^ versus the v plane, a graph 320 that plots Q versus the normalized IOB ( ^^ ^^ ^^ ^^) plane and a graph 330 that plots ^^ versus the ^^ ^^ ^^ ^^ plane which can be compared with the trajectories of the glucose ROC-IOB plane of the graph 230 in FIG.2. [0067] The example asymmetric weighting function ^^ ^ ^^, ^^ ^^ ^^ ^^ ^ built with these requirements is shown in FIG. 3. The details of the construction using glucose ROC ( ^^, mg/dL/min) and normalized IOB ( ^^ ^^ ^^ ^^, unitless) are as follows. Given significant difference in insulin requirements between persons, such as by daily caloric (and carbohydrate) intake and lifestyles, the IOB value has to be normalized. People with T1D have record of their total daily insulin (TDI) which is the sum of all insulin delivered over 24 hours consisting of basal (total daily basal (TDBa)) and feedforward insulin boluses (total daily boluses (TDBo)). As IOB is calculated in deviation of basal and due to day-by-variability in TDBo, the normalization is performed using long term average of TDI and TDBa as: ^^ ^^ ^^ ^^ ூை^ೖ ^ ൌ ^ୈ୍ି^ୈ^ୟ . (9) 16 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT Similarly, the magnitude of glucose ROC varies between persons and in the young children particularly; however, the variations are much smaller and not straightforward to normalize, and hence model-based ^^ are directly used. [0068] Sample points and univariate weighting functions are then applied by selecting thresholds for ^^ and ^^ ^^ ^^ ^^. The thresholds are used to construct the univariate weighting function ^^( ^^) when ^^ ^^ ^^ ^^ = 0 and ^^( ^^ ^^ ^^ ^^) when ^^ = 0, and joint information at select points. For simplicity, these are specified using linear equations in terms of sample points for ^^ versus ^^ in a graph 410 and for ^^ versus ^^ ^^ ^^ ^^ in a graph 420 shown in FIG. 4A. The thresholds and the maximum value of ^^ were tuned using the 10 adult virtual subject cohort of the UVA/Padova metabolic simulator and clinical data. In the graph 410, starting from the left of ^^ axis, negative threshold was set at ^^ = −1.5 mg/dL/min for weight ^^ = ^ ^ 0, and the threshold for ^^ = 3 was set at ^^ = ±0.25 mg/dL/min, and the positive threshold was set at ^^ = 1.5 mg/dL/min for weight ^^ = 1. The threshold for ^^ ^^ ^^ ^^ in the graph 420 was calculated assuming a 50 − 50 split between TDBa and TDBo. Considering three large meals in a day, ^^ ^^ ^^ ^^ would peak at 0.33. A threshold of around half of that ^^ ^^ ^^ ^^ = 0.15 was chosen for ^^ > 1. In the code, any ^^ ^^ ^^ ^^ > 0.15 was maxed out at 0.15. In order to create a joint surface, additional link points were provided as ( ^^, ^^ ^^ ^^ ^^, ^^) triplet: (−3, 0.15, ^), (−1.5, 0.15, ^), (1.5, 0.15, 1) and (3, 0.15, 1) to cover the extremities of ^^ under the upper threshold of ^^ ^^ ^^ ^^. [0069] For surface fitting the sample points were interpolated using a triangulation based natural neighbor interpolation to create the surface shown in the graphs in FIG. 3. The surface between defined | ^^| ≤ 1.5 mg/dL/min and 0 ≤ ^^ ^^ ^^ ^^ ≤ 0.15 were fit by a second degree polynomial function using least squares. The estimated parameters are shown in a table 450 in FIG.4B, where the r-squared value was greater than 0.98 for both surfaces. [0070] The surfaces in FIG. 3 are partitioned by magnitude of ^^ and fit using polynomial equations of second degree as: 17 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT ì ^^ ^^ ^ െ1.5 ï ^^^^ ^ ^^^^ ^^ ^ ^^^^ ^^ ^^ ^^ ^^ ^ ^^ ^ ^^ ^^ ^^ ^^ ^^ where ^ ^ 0 ^^ and ^^ are reported in the table 450 in FIG.4B. Within the region defined by ≤ 1.5 mg/dL/min and 0 ≤ ^^ ^^ ^^ ^^ ≤ 0.15 in the ^^– ^^ ^^ ^^ ^^ plane, the effect of ^^ on ^^ is modulated by ^^ ^^ ^^ ^^ , and vice- versa. Thus, for a given ^^, the controller is more aggressive when ^^ ^^ ^^ ^^ is low and similarly for a given ^^ ^^ ^^ ^^, the controller is more aggressive when ^^ is low. Thus, the controller aggressiveness over baseline is increased only when deemed necessary. Any additional insulin over baseline weighting will result in increase in ^^ ^^ ^^ ^^ or ^^, which will inhibit further increase of ^^. The adaptation of ^^ (over time) has a few salient characteristics. [0071] By design, ^^ is independent from the glucose level, ^^ ^ . In particular, ^^ will be highest at the origin of ^^– ^^ ^^ ^^ ^^ plane, which, during the nominal condition, corresponds to the glucose value within the zone. However, the actual cost incurred in that case will be zero as the zone excursion variables z^ , z^ will be zero. The weighting scheme independent of glucose enables the controller to aggressively correct drifts from the zone and may reduce any offsets more effectively. [0072] Another characteristic is adaptation of ^^ during feedforward insulin. Following feedforward insulin, such as during a meal or for correcting prolonged hyperglycemia, the weight will change to a value on the right half of the ^^– ^^ ^^ ^^ ^^ plane, but never go below 1 as long as ^^ is positive. This implies that controller is primed to correct for meal related hyperglycemia while the IOB from bolus has an effect. Further, the nominal threshold for ^^ ^^ ^^ ^^ = 0.15 as explained above is tuned such that ^^ may not increase > 1 around meal peak when ^^ will be low, when additional insulin may be not required following an optimal bolus, but interjects later more aggressively when additional insulin may be required such as in case of an extended meal disturbance response. [0073] Another characteristic is adaptation of ^^ during feedback insulin only. With feedback insulin only in response rising glucose from a meal, the weight will gradually change to a value in the top of half of the ^^– ^^ ^^ ^^ ^^ plane as ^^ ^^ ^^ ^^ increases from the delivered insulin, but never goes 18 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT below ^^ = 1 as long as ^^ is positive. Since the feedback action gradually increases the IOB, ^^ > 1 is likely in the beginning of the meal excursion before reaching the peak, and hence the controller may be more assertive than the baseline weight. [0074] Another characteristic is adaptation of ^^ and velocity weighting only. By construction, the joint weighting ^^^ ^^, ^^ ^^ ^^ ^^^ is functionally equivalent to the velocity weighting ^^^ ^^^ when ^^ ^^ ^^ ^^ = 0.15. [0075] The example MPC is set up as a problem based on an insulin glucose model. The model predictions are based on a linear three-state control-relevant personalized model. Using a simulated sampled data set of insulin deviations, ^^ of delivered insulin ^^ ୍^ from virtual subject- specific basal insulin ^^ ୠୟ^ୟ୪ converted from U/h to microboluses (U/5-min) and glucose deviation y of plasma glucose ^^ ^ from a steady-state glucose reference of ^^ ^ = 110 mg/dL sampled at five minute intervals, a third order output-error structure was identified that captured dynamics around the bandwidth with a personalized gain parameter. A state-space realization with an additional output of glucose velocity v is: ^^ ^ା^ ൌ ^^ ^^ ^ ^ ^^ ^^ ^ , (11) ^^ ^ ൌ ^^ ^^ ^ , (12) ^^ ^ ൌ ^^ ^^ ^ , (13) where A ∈ ℝ 3×3 , B ∈ ℝ 3×1 , C y ∈ ℝ 1×3 and C v ∈ ℝ 1×3 are defined as: ^ ^ ^ 2 ^ ଶ ଶ ^ ^ଶ െ2 ^^^ ^^ଶ െ ^^ଶ ^^^ ^^ଶ ^^ ^ ^ ^ ∶ൌ ^ 0.1 0 െ0.1 ^. (17) The poles of the open-loop model are p1 = 0.98 and p2 = 0.965. The negative model gain B indicates the inverse insulin glucose relationship that is statically personalized to the virtual subject’s total daily insulin (TDI > 0). Given a new CGM measurement every five minutes, ^^ ^ is calculated as difference of the first and the third state element over 10 minutes resulting in predicted glucose 19 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT ROC in mg/dL/min. At each k, with a new glucose measurement ^^ େୋ^,^ , the state ^^ ^ is updated by an observer as: ^^ ^ ൌ ^^ ^^ ^ି^ ^ ^^ ^^ ^ି^ ^ ^^^൫ ^^ େୋ^,^ െ ^^ ^ ൯ െ ^^ ^^ ^ ^ (18) where the the weights are tuned rejection performance. [0076] The insulin-on-board and constraints are calculated by directly using a convolution of pre-specified decay curves Θ ^ of decay time ^^ in hours and recent insulin delivery history ^^ as: ^^ ^^ ^^ ^ ൌ ∑ ^ ୀ^ Θ ^,த ൈ ^^ ^ିத (19) where m = 8× effect of insulin ^^ = ^^ ^^ ^^ ^^ ^^. curve, Θ is parameterized using a cosine function for smooth switching between curves of different length. [0077] The input ^^ ^ is constrained by time-varying bounds: ^ ^^ ∈ ^λ ^ ^ ^൧. (20) The lower bound λ ^ ^ ≤ 0 enforces the non-negativity requirement for insulin delivery, and is equal to the negative basal λ ^ ^ = − ^^ୠୟ^ୟ୪,୩. The upper bound λ ^ ^ ≥ 0 is calculated using two conditions. First, the insulin del by amplitude constraints λ^^,^ equal to four times ^^ୠୟ^ୟ୪,୩ from 10 pm to 4 am, and equal to 1 U for other times of the day. Second, the insulin delivery is upper bounded by an IOB constraint to prevent over-delivery as: λ ^ ൌ max ீిృ^,ೖ ି ௬ೞ ^^,^ ^ େ^ೖ െ ^^ ^^ ^^^ , 0^ (21) where CF is due to a insulin bolus (mg/dL/U), which is indicative of insulin sensitivity. The ^^ ^^ ^^ ^ term in Equation 21 is the sum of IOB from feedforward boluses based on curve length l = 4 hours and IOB from the controller microboluses based on varying curve lengths l ∈ [26] hours using ^^ େୋ^ -based transition between 300 − 120 mg/dL. The upper bound is selected as λ ^ ^ ൌ min^λ ^ ^^,^, λ ^ ୍^^,^^. (22) [0078] The controller penalized zone excursion ^^^ from the time-varying zones ^ ^ ^ ^^ , ^ ^ ^^^ using a zone excursion function Z: ^ ^^ ൌ ^^ ^ ^^, ^^ ^ ൌ arg min ^ ^^ ห ^^ ^ ^^^ െ ^^ ^^ ^ ^ ^ ^^ , ^ ^ ^^^^ (23) ఈఢℝ 20 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT That results in z k calculated from the nearest zone boundary, and is zero if glucose is within the zone boundaries. The day zones values were 90–120 mg/dL from 6 am until 10 pm and the overnight zone values were 100–120 mg/dL from midnight to 4 am with a smooth transition between the diurnal zone bounds. [0079] Thus, the MPC problem is defined as extending the description for the MPC cost in Equation 8, the control horizon is ^^௨ ∈ ℤ1:Ny, and the weights, ^^, ^ ^ ^, ^ ^ ^ , ^ ^ ^ ∈  ℝ>0 of appropriate dimensions, the decision variable input u, predicted state x, predicted glucose y, predicted glucose velocity v, and predicted glucose excursion ^^. At each k, with updated state, ^^ ^ a constrained finite horizon optimization problem is solved to determine the optimal control sequence u : ^ ^^ ^ , … , ^^ ି^ ^ ൌ arg min ^^^ ^^ ^ , ^ ^^ ^ , … , ^^ ேೠି^ ^^ (24) where ே ^ ^ ൌ ^൫ ^^ ^^ ^^ ^ ^ The λ^^ା^ ], u୧ ൌ 0 ∀i ∈ ℤNu:Ny-1, min^ z୧, 0^, v^న ൌ max^ v୧, 0^ of appropriate dimensions where ^^ ^^ ^^ ^^ is the normalized IOB as described above. Thus, in this example, the algorithmic weight Q is applied to a predicted glucose deviation from an upper zone term of the model predictive control algorithm. Consequently, the insulin microbolus ^^ ఓୠ to be delivered is calculated as: ^^ ఓୠ,^ ൌ ^ ^^ ୠୟ^ୟ୪,^ . (27) [0080] In addition to terms described in Equation 8, the positive velocity penalty term ^ ^ ^v^ ^ , which is active in glucose range 140 − 180 mg/dL, and asymmetric penalty on deviation above basal ^^^ and deviation below basal ^^^ are unmodified. [0081] The controller parameters were tuned using the 10 adult virtual subject cohort of the UVA/Padova metabolic simulator and were fixed for the cohort at the following values: ^^ = 9, ^^௨ = 5, R ^ = 6500, ^ ^ ^ = 100, ^ ^ ^ = 1000, and ^^ ^ ^^, ^^ ^^ ^^ ^^ ^ as described in the above description of the weight, ^^, with ^ = 10 −6 . The model predicted v and ^^ ^^ ^^ ^^ results in changing ^^ over the 21 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT prediction horizon. Using auxiliary variables to bound the zone excursion ^^, velocity v and input u, for a given sequence of ^^^v୧, ^^ ^^ ^^ ^^^^ ∀i ∈ ℤ1:Ny, the optimization problem in Equation 24 is a convex quadratic program. Since the ^^ ^ v , ^^ ^^ ^^ ^^ ^ ^ is itself a function of calculated control sequence u , the solution has to be obtained iteratively. Using an initial assumption of v and ^^ ^^ ^^ ^^ using current state ^^ ^ and u ൌ 0 , an initial weight column vector value is used to calculate u that is then fed back to recalculate ^^. The convergence criteria for terminating iterations is set to a maximum absolute difference between successively recalculated ^^ column vector values to be less than 10 −6 or if the iteration exceeds a set limit of ten. [0082] In Equation 25, the value of ^^ ^^ ^^ ^^ ^ is a function of index ^^ and not ^^. In other words, the IOB value stays constant throughout the prediction horizon. Similarly, the IOB constraint in Equation 21 is also implemented in the same fashion. There are two main reasons for this: first, large changes in the IOB typically only occur due to a feedforward bolus which is unknown to the controller over the prediction horizon, and second, IOB will not change significantly over the shorter prediction horizon relative to the IOB decay curve. A longer horizon may require incorporation of IOBn i in the calculation of the control sequence. Notwithstanding, at each ^^, ^^ ^^ ^^ ^^ ^ is updated using the historical insulin delivery ^^. [0083] Due to limitations with subcutaneous insulin absorption and size of meal disturbance, the feedback control is usually augmented with a user-requested feedforward insulin bolus. In this example, a bolus calculator uses an estimate of meal carbohydrate size M (g) and person-specific time-varying insulin-to-carbohydrate ratios CR ^ (g/U) to calculate a feedforward bolus ^^ ^^ୠ as: ^ ୈೖ if ^^େୋ^,୩ ^ 120 mg/dL, ( 28) otherwise, where the if the current glucose level is below a threshold as a precaution. Additionally, a correction bolus up to 2 U is added to ^^ ^^ୠ to correct elevated glucose up to ^^ େୋ^ = 150 mg/dL. The total insulin delivered ^^ ୍^,^ is a sum of microboluses and feedforward boluses: ^^ ୍^,^ ൌ ^^ ఓୠ,^ ^ ^^ ^^ୠ,^ . (29) Simulations show the effectiveness of the example system using the weight ^^ in a zone MPC controller for determining insulin boluses. The numerical simulations were performed on an independent cohort of 100 adult virtual subjects from the UVA/Padova metabolic simulator. Each 22 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT simulation of the virtual subjects was repeated ten times to produce variability from measurement noise and meal disturbance, thus resulting in a total of 1000 data points for any given comparison. The virtual subjects contain a range of parameters to represents real-life variability including those on the limits of plausibility. [0084] The simulations compare the example zone MPC controller with glucose ROC and IOB joint weighting (QvIOB) to a reference zone MPC controller with velocity weighting only (Qv) with day zones of 90–120 mg/dL and overnight zone of 100–120 mg/dL. The two controllers differed in only two aspects: the use of the weighting function ^^, and ^^ ∈ [28] in the reference Qv controller. The simulations allow for a head-to-head comparison of the example QvIOB controller with a clinically-validated controller. [0085] The evaluation of the zone MPC controller with the ROC and IOB joint weighting was performed using two scenarios: Scenario A with induced resistance based on the aforementioned parameters and factor of 0.75; and Scenario B with nominal parameters to contrast with Scenario A. For Scenario A, the correction factor CF ^ was also scaled by a factor of 0.5 for both controllers so that safety constraint was sufficiently relaxed commensurate with degree of induced resistance to allow fair comparison of the effect of weight adaptation, whereas for Scenario B, no such modification was made. The simulation started at 6 am and three meals were provided over a total of 24 hours. Each meal amount was sampled from a normal distribution while the meal time was sampled from a uniform distribution over span of ±1 hour from a reference value. Specifically, the three meals had a mean of 50 g (breakfast), 75 g (lunch) and 75 g (dinner) with a standard deviation of 10 g. Thus, the average total daily carbohydrate intake provided in this scenario was 50 + 75 + 75 = 200 g. The meal timings were from a reference value of 9 am (breakfast), 1 pm (lunch) and 7 pm (dinner). The variability in meal size and time is shown in a graph 510 of simulated variability in meal size and a graph 520 of simulated variability in meal time in FIG.5 for the tests for Scenario A. As shown in the graphs 510 and 520, the meal size was normally distributed while the meal time was uniformly distributed. [0086] Finally, within each scenario, four different test conditions compared the two controllers under different level of prior insulin from feedforward boluses calculated using the nominal insulin-to-carbohydrate ratios and mismatches in meal size information: 1) no bolus (feedback insulin only); 2) nominal bolus; 3) underestimation of meal bolus by 25%; and 4) overestimation of meal bolus by 25%. For each simulation, the noisy glucose measurements GCGM 23 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT are used as the measured signal for feedback control while the glucose outcomes are calculated using plasma glucose Gp, both sampled at five minutes. The controller performances were compared using outcomes based on glucose and insulin data calculated for the complete day and night period (24 hours) and for the overnight period (12 am to 6 am, 6 hours). The results are summarized in FIGs. 7A-7B and 9A-9B as an empirical cumulative distribution function (CDF) of glucose, where better control will move the CDF curve steeper and to the left in the desired glucose range, and as control-variability grid analysis (CVGA) scatter plot of maximum and minimum glucose with pre-specified glucose zones. In the CVGA plot, a point corresponds to one simulation (each virtual subject has 10 points) where a better control will keep the points within zones A and B on the lower left. The lower bound of the CVGA plot was relaxed from the original value of 110 mg/dL to 125 mg/dL in order to visualize more points for the induced resistance scenario. [0087] In the table 600 in FIG.6 and the table 800 in FIG.8, the glucose outcomes summarized the distribution of glucose using mean and standard deviation (SD) and using percent time in range, below and above glucose thresholds of clinical interest. The low blood glucose index (LBGI) and high blood glucose index (HBGI) quantify the glycemic risks and the number of CVGA data points in the pre-specified zones were used to highlight the regulation trade-off. The insulin outcomes summarized the sum of all insulin ൫∑ ^ ^^ IN,^ ൯, sum of microbolus insulin ൫∑ ^ ^^ ஜb,^ ൯, sum of feedforward insulin ൫ ^ ^^ ffb,^ ൯, and sum of microbolus insulin deviation from nominal basal greater than zero ^^ basal,^ ൯ ൌ ∑ ^ Δ ^^ ஜb,^ ^ 0൯ highlighting insulin increased above basal to limit to zero ൫∑^ ൫ ^^ஜb,^ െ ^^basal,^൯ ൌ ∑^ Δ ^^ஜb,^ ^ 0൯ highlighting insulin reduced below basal to limit hypoglycemia. Due to asymmetric insulin penalty weights ^ ^ ^ ≫ ^ ^ ^ , insulin microbolus less than basal are mostly zero, i.e., complete pump suspension. Thus, ^ Δ ^^ ஜb,^ ^ 0 is proportional to the length of pump suspension multiplied by the basal rate of [0088] With repeated data for each virtual subject, the p-value was calculated using linear mixed-effects models with random intercept for the null hypothesis of no fixed effect difference between the two controllers. Models were fit using the maximum likelihood method and the degree of freedom using the Satterthwaite approximation. No p-values could be calculated for the CVGA regions for data summarized as scalar counts at the cohort level. The estimate and p-value for 24 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT distribution of ^^ was calculated using an intercept only fixed effect with random intercept where the p-value was calculated for the null hypothesis of ^^ = 1 using an F-test. A threshold of p = 0.001 was used to highlight an effect. [0089] For Scenario A with induced resistance, the example QvIOB controller consistently improved glucose outcomes versus the Qv controller by gradually increasing insulin delivery without incurring additional time in hypoglycemia as noted in the results shown in a table 600 in FIG. 6. The table 600 shows outcomes for induced resistance in Scenario A for the example controller (QvIOB) versus the reference controller (Qv). Data are shown as mean (standard deviation), the percent time threshold are in mg/dL and the significant effects are highlighted using a † symbol. [0090] The difference between controllers were larger with less prior insulin, in particular for the overnight period, when the controllers had more leeway to act. For the underestimated bolus test condition and complete period, the mean glucose was lower (160.2 mg/dL versus 164.2 mg/dL, p < 0.001), percent time 70−180 mg/dL was higher (73.4% versus 70.2%, p < 0.001) through increased insulin above basal (12.8 U versus 11.3 U, p < 0.001) or approximately 13% more, but no significant change in glucose SD (30.3 mg/dL versus 29.9 mg/dL, p = 0.017). Similarly, for the overnight period, percent time in the tighter glucose range 70 − 140 mg/dL was higher (80.4% versus 66.9%, p < 0.001) through increased insulin above basal (2.5 U versus 2.0 U, p < 0.001) or approximately 25% more. For the no bolus test condition and complete period, there were larger changes in mean glucose and percent time in 70 − 180 mg/dL (183.5 mg/dL versus 192.2 mg/dL, p < 0.001 and 53.5% versus 48.9%, p < 0.001, respectively) with lower HBGI (9.9 versus 11.5, p < 0.001) and no change in LBGI (p = 0.158) through increased insulin above basal (19.5 U versus 17.7 U, p < 0.001) or approximately 10% more. Similarly, for the overnight period, percent time in 70 − 140 mg/dL improved by 18% (70.9% versus 52.9%, p < 0.001) though increased insulin above basal (2.6 U versus 2.2 U, p < 0.001) or approximately 18% more. The percent time in 70−140 mg/dL for the example QvIOB controller (33.4%) for underestimated bolus was midway between the values during the nominal bolus for the two controllers (36.2% and 30.6%), and similarly was comparable between no bolus with the QvIOB controller and underestimated bolus with the Qv controller (27.6% and 27.5%) which highlights that the weighting scheme reduced offsets by supplementing additional insulin. The choice of a nominal CF ^ would have resulted in 25 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT smaller effect sizes due to control action saturating from the safety constraint (Equation 21) (data not shown). [0091] FIG. 7A shows graphs of a comparison of glycemic performance during Scenario A under the no bolus (feedback only) condition for day and night time periods. An empirical CDF plot 710 comparing mean for QvIOB shown as a trace 712 (solid line) versus Qv shown as a trace 714 (dashed-dot line) with one standard deviation from the trace 712 shown as a shaded region 716 and one standard deviation from the trace 714 shown as a shaded region 718. A CVGA plot 720, with a lower bound relaxed to 125 mg/dL, compares the CVGA data mean (represented by two vertical lines 722 and 724 and two horizontal lines 726 and 728 with keys matching the plots in the plot 710) and one standard deviation shown as ellipses 732 and 734 where the individual Qv controller CVGA points (squares) were moved from the left and top region to the interior as QvIOB controller CVGA points (circles). The CVGA plot 720 is divided into nine zones to highlight different qualities of glucose control: Upper C (failure to correct hyperglycemia with over avoidance of hypoglycemia), Upper D (failure to correct hyperglycemia), E (failure to correct hyperglycemia and avoid hypoglycemia leading to inadequate control), Upper B (benign hyperglycemia), B (benign hyperglycemia and benign hypoglycemia), Lower D (failure to avoid hypoglycemia), A (adequate control), Lower B (benign hypoglycemia) and Lower C (failure to avoid hypoglycemia with over correction of hyperglycemia). [0092] FIG. 7B shows graphs of a comparison of glycemic performance during Scenario A under the no bolus (feedback only) condition for overnight time periods. An (A) empirical CDF plot 750 comparing mean for the example QvIOB controller shown as a trace 752 (solid line) versus the Qv controller shown as a trace 754 (dashed-dot line) with one standard deviation from the trace 752 shown as a shaded region 756 and one standard deviation from the trace 754 shown as a shaded region 758. A CVGA plot 760, with a lower bound relaxed to 125 mg/dL, compares the CVGA data mean (represented by two vertical lines 762 and 764 and two horizontal lines 766 and 768 with keys matching the plots in the plot 750) and one standard deviation shown as ellipses 772 and 774 where the individual Qv controller CVGA points (squares) were moved from the left and top region to the interior as QvIOB controller CVGA points (circles). The CVGA plot 760 is divided into nine zones, Upper C, Upper D, E, Upper B, B, Lower D, A, Lower B, and Lower C that are identical to the zones in the CVGA plot 720 in FIG.7A. 26 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT [0093] FIGs.7A-7B compares the respective CDF plots 710, 750 and CVGA plots 720, 760 for the no bolus test condition for both time periods of day and night time and overnight periods. The example QvIOB controller mean CDF stayed on the left and did not cross the Qv controller mean CDF highlighting consistent improvement with larger differences for the overnight period in FIG.7B. The modified CVGA plots indicates decreased maximum as well as minimum glucose due to CVGA points moving from the zone C to the zone B, and from zone B to zone A for all four test conditions with larger shifts for the complete time period as shown in the table 600 in FIG. 6. The number of CVGA points in zone D and zone E were comparable between the controllers. Finally, small differences in the size of feedforward bolus insulin were due to meal variability and bolus calculation in Equation 28 as a function of glucose. [0094] For Scenario B with nominal parameters, the improvement in glucose outcomes were again consistent, but more modest, than Scenario A. This is due to nominal insulin requirements as noted in the results complied in a table 800 in FIG.8. The table 800 shows outcomes for nominal scenario B for the example controller (QvIOB) versus the reference controller (Qv). Data are shown as mean (standard deviation), the percent time threshold are in mg/dL, and the significant effects are highlighted using the † symbol. [0095] Even for the case of an overestimated bolus test condition and complete period, the example controller did not induce significant hypoglycemic risk (LBGI) (0.2 versus 0.2, p = 0.019) where the mean glucose was lower (130.7 mg/dL versus 132.2 mg/dL, p < 0.001), percent time in the tighter glucose range 70 − 140 mg/dL was higher (71.1 versus 69.9, p < 0.001) through increased insulin above basal (4.9 U versus 4.0 U, p < 0.001) or approximately 22% more, but no significant change in glucose SD (27.4 mg/dL versus 27.3 mg/dL, p = 0.566). Similarly, for the overnight period, percent time in the tighter glucose range 70 − 140 mg/dL was higher (97.3% versus 95.6%, p < 0.001) and no change in percent time < 70 mg/dL (0.2% versus 0.2%, p = 0.323) through increased insulin above basal (1.7 U versus 1.3 U, p < 0.001) or approximately 30% more. [0096] FIG. 9A-9B compares the CDF and CVGA plots for the no bolus test condition for both time periods of day and night time and overnight periods. FIG. 9A shows graphs of a comparison of glycemic performance during Scenario A under no bolus (feedback only) condition for day and nighttime periods. An empirical CDF plot 910 comparing mean for the example QvIOB controller shown as a trace 912 (solid line) versus the Qv controller shown as a trace 914 (dashed-dot line) with one standard deviation from the trace 912 shown as a shaded region 916 27 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT and one standard deviation from the trace 914 shown as a shaded region 918. A CVGA plot 920 compares the CVGA data mean (represented by two vertical lines 922 and 924 and two horizontal lines 926 and 928 with keys matching the plots in the plot 910) and one standard deviation shown as ellipses 932 and 934 where the individual Qv controller CVGA points (squares) were moved from the left and top region to the interior as the QvIOB controller CVGA points (circles). The CVGA plot 920 is divided into nine zones, Upper C, Upper D, E, Upper B, B, Lower D, A, Lower B, Lower C, identical to the CVGA plot 720 in FIG.7A. [0097] FIG. 9B shows graphs of a comparison of glycemic performance during Scenario A under no bolus (feedback only) condition for overnight time periods. An (A) empirical CDF plot 950 comparing mean for the example QvIOB controller shown as a trace 952 (solid line) versus the Qv controller shown as a trace 954 (dashed-dot line) with one standard deviation from the trace 952 shown as a shaded region 956 and one standard deviation from the trace 954 shown as a shaded region 958. A CVGA plot 960 compares the CVGA data mean (represented by two vertical lines 962 and 964 and two horizontal lines 966 and 968 with keys matching the plots in the plot 950) and one standard deviation shown as ellipses 972 and 974 where the individual Qv controller CVGA points (squares) were moved from the left and top region to the interior as the QvIOB controller CVGA points (circles). The CVGA plot 960 is divided into nine zones, Upper C, Upper D, E, Upper B, B, Lower D, A, Lower B, Lower C, identical to the CVGA plot 720 in FIG.7A. [0098] The QvIOB controller mean CDF stayed on the left and did not cross the Qv controller mean CDF, highlighting small but consistent improvement. The CVGA plot indicates decrease in maximum as well as minimum glucose with most of the CVGA points in zone B and zone A. However, there was a small increase in CVGA points in the zone D and zone E during the complete period and in the lower zone C during the overnight period indicating the QvIOB controller was more aggressive during nominal scenario for a few virtual subjects, but this was deemed acceptable for clinical use. Consequently, the amount of insulin below basal was slightly higher (−4.6 U versus −4.0 U, p < 0.001 for the no bolus and complete period, or approximately 15% more) indicating that longer pump suspensions were needed. [0099] The example QvIOB controller was evaluated as part of three separate multi-center clinical studies using the iAPS platform running on an unlocked smartphone. These were a two week outpatient study in 10 adults with in-clinic induced stress (NCT04142229), a three-month outpatient study in 35 adults with data-driven adaptation supervisory layer (NCT04436796), and 28 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT a 48-hour simulated outpatient study in 11 adult pregnant women (NCT04492566). In these studies, participants announced meals to the system where the closed-loop arm outperformed or was at least as good as the standard-of-care arm. [00100] FIG.10 shows a table 1000 that compares the glucose time in range outcomes from the aforementioned clinical studies as well other recent studies utilizing different versions of zone MPC controllers in adults, adolescents and children, and pregnant women cohorts. In the table 1000, the • symbol represents data are reported as median, other study data are reported as mean; the ⋄ symbol represents setpoint MPC with a modified bolus calculator; the ⋆ symbol represents updated zones as described above; and the † symbol represents data with a data-driven adaptation supervisory layer; the symbol represents updated tuning including decreased zones of 80 − 110 mg/dL during day and 80 − 100 mg/dL during overnight targeting glucose in the range 63 − 140 mg/dL. [00101] Overall, use of the example controller in outpatient at-home studies was safe with no adverse events. The percent time in 70 − 180 mg/dL for the three listed outpatient studies were close or above the clinical recommendations of > 70% for both the day and night period as well as for the overnight period. In the pregnancy with T1D study, given much tighter pregnancy-specific target range of 63 − 140 mg/dL, true indication for hypoglycemia is captured by percent time < 63 mg/dL which was 2% in this study again satisfying the clinical recommendations. It is worth noting that the time in range during the overnight hours with the example QvIOB controller were lower than the 48 hours simulated outpatient study, which used set point MPC and a modified feedforward bolus calculator. Comparing with other outpatient studies in adults, the example QvIOB controller had a comparable day and night and overnight performance while it was the only controller used in pregnant women cohort. [00102] FIG. 11A shows a set of histograms 1110, 1112, 1114, and 1116 of ^^ from day and night times during a two-week clinical study. Correspondingly, FIG.11B shows a set of histograms 1160, 1162, 1164, and 1166 of ^^ from overnight times during the two-week clinical study. The dashed lines 1120, 1122, 1124, 1126 in FIG.11A and dashed lines 1170, 1172, 1174, and 1176 in FIG. 11B represents the mean value of ^^. Thus, the histograms in FIGs. 11A-11B are a comparison of histograms of ^^ during two-week clinical study with induced stress for (A) day and night (FIG. 11A) and (B) overnight time period (FIG. 11B). Each time period shows subplots grouped by different four different glucose G CGM thresholds. 29 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT [00103] The histograms in FIGs. 11A-11B compare the empirical distributions of weight ^^ from all 13 participants who completed the outpatient study with induced stress. In order to highlight the adaptation of ^^ under different glucose values, the distribution was evaluated for all ^^ େୋ^ (histograms 1110 and 1160), for glucose above clinical hyperglycemia threshold ^^ େୋ^ > 180 mg/dL (histograms 1112 and 1162) and below that threshold ^^ େୋ^ ≤ 180 mg/dL (histograms 1114 and 1164), and specifically for glucose in ^^ େୋ^ ∈ [120180] mg/dL (histograms 1116 and 1166) to highlight incurred cost due to non-zero zone excursion z^ from the upper zone boundary of 120 mg/dL. The data distributions are shown for both time periods. [00104] The controller weight adaptation was more aggressive during the overnight hours ( ^^ = 2 (p < 0.001)) versus the complete period ( ^^ = 1.5 (p < 0.001)). With feedforward boluses during the day, the ability or need for the controller to increase the weight was limited. For ^^ େୋ^ > 180 mg/dL, ^^ was similar to one for both overnight period and the complete period (1.1 (p = 0.586) and 0.9 (p = 0.011)) indicating that the ^^ ^^ ^^ ^^ value was saturated. On the other hand, for ^^ େୋ^ ≤ 180 mg/dL, and in particular for glucose in 120 − 180 mg/dL range, ^^ was larger than one, with overnight period showing larger values than the complete period (2.2 (p < 0.001) and 1.7 (p < 0.001)) and (2.0 (p < 0.001) and 1.5 (p < 0.001)), respectively. [00105] In the empirical distributions, particularly during the complete period for all glucose values, there were three distinct concentrations of values: ^^ = 0, which occurred for negative and falling ^^, ^^ = 1 when ^^ and ^^ ^^ ^^ ^^ were high such as following a meal, and ^^ = 3 for condition of both low ^^ and ^^ ^^ ^^ ^^ as described above. Finally, increases in ^^ may not have necessarily resulted in more insulin delivery as either the cost may not have increased if z^ was zero, or the input constraint may have limited insulin delivery. To contrast with the reference Qv controller, the ^^ values in that case can only change between 0 and 1. [00106] FIG. 12 shows a series of plots that demonstrate the adaptation of ^^ by the example QvIOB controller during induced a stress session for an adult participant. FIG.12 shows a first plot 1200 of CGM and meals versus time, a second plot 1210 of controller microboluses and feedforward boluses versus time, a third plot 1220 of ^^ over time, a fourth plot 1230 of ^^ versus time, and a fifth plot 1240 of ^^ ^^ ^^ ^^ over time. Each marker • denotes a controller instance ^^. For each ^^, the ^^ and ^^ trajectories only show value for ^^ = 1. 30 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT [00107] The plots in FIG.12 demonstrate the adaptation of ^^ during prolonged hyperglycemia from induced pharmacological stress. The adult participant underwent supervised stress session using oral hydrocortisone (total of 80 mg in three separate doses over 8 hours) resulting in higher insulin requirement over the nominal case. The resulting prolonged hyperglycemia (subplot 1200) was observable from the start of the stress session from 7 am until the next day at 12 pm, and especially during the overnight period. [00108] During the day and the evening, due to feedforward boluses (as shown in plot 1210) from large meals (shown in plot 1200), λ ^ ୍^^,^ did not allow for much increased microboluses (as shown in plot 1210) although the plot of ^^ (plot 1220) was greater than one in some time segments. During the overnight period, as highlighted by the dashed rectangle, with low ^^ (shown in plot 1230) and ^^ ^^ ^^ ^^ (shown in plot 1240), the example QvIOB controller increased controller microboluses up to 1 − 2.5 times the basal (shown in plot 1210) with ^^ > 1 resulting in glucose near the zone by 6 am. During the stress session, with ^^ ^^ ^^ ^^ as large as 0.8, the controller was able to prevent hypoglycemia following the dinner with zero microboluses as well as following large positive rise in ^^ and ^^ ^^ ^^ ^^ > 0 such as during breakfast, kept ^^ = 1 to limit over delivery. The insulin delivery would have been higher, especially during the overnight period, if λ ^ ୍^^,^ were relaxed instead of use of unmodified profiles. Thus, there was a significant disturbance effect that was not timely rejected by the controller. [00109] To demonstrate benefit of the example controller design if it were used in other clinical studies, data from an adolescent participant using the Qv controller was fed through the example QvIOB controller to retrospectively compare the two insulin deliveries. FIG.13 shows a first plot 1300 of CGM and meals versus time, a second plot 1310 of controller microboluses and feedforward boluses versus time, a third plot 1320 of Q over time, a fourth plot 1330 of v versus time, and a fifth plot 1340 of ^^ ^^ ^^ ^^ over time. The plots in FIG. 13 show advisory mode simulations comparing the example QvIOB controller (represented by lines 1312 and 1322) with clinical data from the Qv controller (represented by lines 1314 and 1324) for an adolescent participant. Each marker • denotes a controller instance ^^. Glucose and hence glucose ROC values are identical in both comparisons. For each k, the ^^ and ^^ trajectories only show value for ^^ = 1. [00110] The plots in FIG. 13 demonstrate advisory mode simulations during an instance of overnight prolonged hyperglycemia (plot 1300) following a large meal of 116 grams (triangle in 31 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT plot 1300) and an accompanying bolus of 18.5 U around 6 pm (plot 1310). The controller microboluses (line 1314 in plot 1310) from the Qv controller with a maximum of ^^ = 1 (line 1324 in plot 1320) were not sufficient to limit hyperglycemia where the constraints (Equation 20) were not a limitation since this participant had small a CF ^ (or nominally high insulin requirements). Starting at approximately midnight following the relaxation of λ ^ ୍^^,^ after a meal and with both ^^ (plot 1330) and ^^ ^^ ^^ ^^ (plot 1340) being low, the example QvIOB controller could adapt ^^ > 1 (line 1322 in plot 1320) to increase insulin microboluses (line 1312 in plot 1310). In the advisory mode, given the same inputs and a fixed output, a valid comparison can only be made for the same time instance ^^. On comparing with the nominal basal rate (plot 1310), at each ^^ for the overnight period, the example QvIOB controller suggested insulin varied from 1 − 4 times the basal in comparison to the clinical data that varied from 1 − 2.5 times basal, suggesting if the example QvIOB controller were used in this study, it could have limited hyperglycemia. The QvIOB controller response to falling glucose levels, following the meal around 7 pm, was similar to the clinical data highlighting that it retained the design to prevent hypoglycemia. [00111] A flow diagram in FIG.14 is representative of example machine readable instructions for implementing the example algorithm for generating an insulin microbolus based on a MPC applying a weight determined by glucose rate of change and insulin on board. In this example, the machine readable instructions comprise an algorithm for execution by: (a) a processor, (b) a controller, and/or (c) one or more other suitable processing device(s). The algorithm may be embodied in software stored on tangible media such as, for example, a flash memory, a CD-ROM, a floppy disk, a hard drive, a digital video (versatile) disk (DVD), or other memory devices, but persons of ordinary skill in the art will readily appreciate that the entire algorithm and/or parts thereof could alternatively be executed by a device other than a processor and/or embodied in firmware or dedicated hardware in a well-known manner (e.g., it may be implemented by an application specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable logic device (FPLD), a field programmable gate array (FPGA), discrete logic, etc.). For example, any or all of the components of the interfaces could be implemented by software, hardware, and/or firmware. Also, some or all of the machine readable instructions represented by the flowchart of FIG.14 may be implemented manually. Further, although the example algorithm is described with reference to the flowchart illustrated in FIG.14, persons of ordinary skill in the 32 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT art will readily appreciate that many other methods of implementing the example machine readable instructions may alternatively be used. For example, the order of execution of the blocks may be changed, and/or some of the blocks described may be changed, eliminated, or combined. [00112] The routine first takes sets initial values for the weight and other variables for the MPC (1400). The routine determines the current glucose rate of change based on a reading of the CGM (1402). The routine records the current microbolus (1404). The routine then determines the insulin on board based on the data of microbolus dosages (1406). The routine then calculates the weight, Q, from the determined glucose rate of change and insulin on board (1408). [00113] The routine then applies the MPC by inputting the determined weight and other relevant inputs to determine the insulin microbolus (1410). The routine sends a command to the insulin dosage to the insulin pump (1412). The routine then stores the determined bolus insulin dose value (1414). The routine then loops back to determination of the glucose rate of change for the next pre-determined period, such as five minutes. [00114] The example zone MPC formulation with joint weighting of predicted glucose ROC and normalized IOB addresses prolonged hyperglycemia while retaining the feature to avoid hypoglycemia. The example QvIOB controller may be implemented on a smartphone-based platform. The algorithm of the example QvIOB controller was verified via numerical simulations, which included a scenario with an increase in insulin requirements, and validated in three FDA approved clinical studies. The continuous adaption scheme using the glucose ROC-IOB plane was capable of decreasing mean glucose and increasing time in 70 − 180 mg/dL, with significant increase in mean Q > 1 for several situations, both in simulations and during real-life use that highlights its utility and safety. [00115] The other zone MPC formulations with adaptive weights on the input may not elicit appropriate control response under conditions of prolonged hyperglycemia due to the trust index based on recent prediction history being not high enough and smaller control penalties weight due to low v. In contrast, the example QvIOB controller, with joint adaptive weighting on the output can nudge glucose independent of the glucose magnitude where the adaptation is directly based on glucose feedback and recorded insulin deliveries, and hence does not require ad hoc rules based on glucose levels or explicit user intervention. Further, as the design is based on physiological states, this leads to intuitive and clinically relevant tuning parameters ^^ and ^^ ^^ ^^ ^^ fitted using 33 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT quadratic surfaces. The weighting surface may be tailored to a person’s changing requirements by learning from data including from trajectories in the glucose ROC-IOB plane. [00116] The joint algorithmic weighting based on glucose velocity and IOB may also be applied to tune/detune other types of model predictive control algorithms such as those based on a set point and other types of controllers. Further, the concept of control to a glucose range can be achieved using a zone MPC strategy among other algorithms. The algorithmic weighting may be applied to other terms in a zone MPC other than the above described predicted glucose deviation from the upper zone term. [00117] Other terms are defined herein within the description of the various aspects of the invention. [00118] All patents and other publications; including literature references, issued patents, published patent applications, and co-pending patent applications; cited throughout this application are expressly incorporated herein by reference for the purpose of describing and disclosing, for example, the methodologies described in such publications that might be used in connection with the technology described herein. These publications are provided solely for their disclosure prior to the filing date of the present application. Nothing in this regard should be construed as an admission that the inventors are not entitled to antedate such disclosure by virtue of prior invention or for any other reason. All statements as to the date or representation as to the contents of these documents is based on the information available to the applicants and does not constitute any admission as to the correctness of the dates or contents of these documents. [00119] The description of embodiments of the disclosure is not intended to be exhaustive or to limit the disclosure to the precise form disclosed. While specific embodiments of, and examples for, the disclosure are described herein for illustrative purposes, various equivalent modifications are possible within the scope of the disclosure, as those skilled in the relevant art will recognize. For example, while method steps or functions are presented in a given order, alternative embodiments may perform functions in a different order, or functions may be performed substantially concurrently. The teachings of the disclosure provided herein can be applied to other procedures or methods as appropriate. The various embodiments described herein can be combined to provide further embodiments. Aspects of the disclosure can be modified, if necessary, to employ the compositions, functions and concepts of the above references and application to provide yet further embodiments of the disclosure. These and other changes can be made to the 34 4881-7752-5631.2 002806-192450WOPT Attorney Docket No: 002806-192450WOPT disclosure in light of the detailed description. All such modifications are intended to be included within the scope of the appended claims. [00120] Specific elements of any of the foregoing embodiments can be combined or substituted for elements in other embodiments. Furthermore, while advantages associated with certain embodiments of the disclosure have been described in the context of these embodiments, other embodiments may also exhibit such advantages, and not all embodiments need necessarily exhibit such advantages to fall within the scope of the disclosure. 35 4881-7752-5631.2 002806-192450WOPT