Search tips
Search criteria 


Logo of jdstLink to Publisher's site
J Diabetes Sci Technol. 2011 November; 5(6): 1312–1326.
Published online 2011 November 1.
PMCID: PMC3262697
Artificial Pancreas

A Controlled Study of the Effectiveness of an Adaptive Closed-Loop Algorithm to Minimize Corticosteroid-Induced Stress Hyperglycemia in Type 1 Diabetes

Joseph El Youssef, M.B.B.S,1 Jessica R Castle, M.D,1 Deborah L Branigan, B.A,2 Ryan G Massoud, B.S,2 Matthew E Breen, B.S,1,2 Peter G Jacobs, M.S.E.E., Ph.D,3 B Wayne Bequette, Ph.D,4 and W Kenneth Ward, M.D1,2


To be effective in type 1 diabetes, algorithms must be able to limit hyperglycemic excursions resulting from medical and emotional stress. We tested an algorithm that estimates insulin sensitivity at regular intervals and continually adjusts gain factors of a fading memory proportional-derivative (FMPD) algorithm. In order to assess whether the algorithm could appropriately adapt and limit the degree of hyperglycemia, we administered oral hydrocortisone repeatedly to create insulin resistance. We compared this indirect adaptive proportional-derivative (APD) algorithm to the FMPD algorithm, which used fixed gain parameters. Each subject with type 1 diabetes (n = 14) was studied on two occasions, each for 33 h.

The APD algorithm consistently identified a fall in insulin sensitivity after hydrocortisone. The gain factors and insulin infusion rates were appropriately increased, leading to satisfactory glycemic control after adaptation (premeal glucose on day 2, 148 ± 6 mg/dl). After sufficient time was allowed for adaptation, the late postprandial glucose increment was significantly lower than when measured shortly after the onset of the steroid effect. In addition, during the controlled comparison, glycemia was significantly lower with the APD algorithm than with the FMPD algorithm. No increase in hypoglycemic frequency was found in the APD-only arm.

An afferent system of duplicate amperometric sensors demonstrated a high degree of accuracy; the mean absolute relative difference of the sensor used to control the algorithm was 9.6 ± 0.5%. We conclude that an adaptive algorithm that frequently estimates insulin sensitivity and adjusts gain factors is capable of minimizing corticosteroid-induced stress hyperglycemia.

Keywords: algorithms, artificial pancreas, corticosteroids, glucose sensor, insulin resistance, type 1 diabetes


Hyperglycemia resulting from medically stressful conditions is associated with a high degree of morbidity and mortality13 and is known to impair the healing of surgical and nonsurgical wounds.4,5 Persons with type 1 diabetes mellitus (T1DM), characterized by an absolute deficiency of insulin, require daily insulin therapy for control of glycemic excursions. Treatment protocols involving multiple daily subcutaneous injections often encounter considerable difficulty in all but the most committed subjects; continuous subcutaneous insulin infusion typically provides some improvement in glycemic control.6

Since 2008, several groups have succeeded in creating algorithms for automated glycemic control using continuous glucose sensor input.711 These algorithms range from a classical proportional-integral-derivative (PID) system11 to model predictive control methods,810 fuzzy logic,12,13 H-infinity control,14,15 and artificial neural networks.16,17 To facilitate development of artificial pancreas algorithms, a group from the University of Virginia provides Food and Drug Administration (FDA)-approved in silico testing of new algorithms in collaboration with the Jaeb Center for Health Research.18 This is accomplished with a MATLAB-based program that describes 300 T1DM subjects with models of glucose sensors and insulin pumps, and reduces the need for animal testing. This impetus toward developing a fully closed-loop system for glycemic control underscores the growing necessity for better management of T1DM.

To the extent that automated systems are effective in T1DM, these systems will need to control excursions that occur as a result of fluctuations in insulin sensitivity. During periods of medical illness, emotional stress, or treatment with medications such as corticosteroids, a fall in tissue sensitivity to insulin occurs.1923 Such a change increases the requirement for insulin and, without compensation, predictably leads to hyperglycemia. As a result, robust control is often difficult to achieve in nonadaptive systems. Utilization of adaptive control has been employed in the field of closed-loop insulin delivery to help address changes in insulin sensitivity.2429 Effective adaptation is predicated on a model of whole body insulin action, which determines insulin requirement during changing insulin sensitivity. Studies of adaptive control in intensive care settings have shown a high degree of glycemic control.30

For this study, our goal was to test the degree to which a novel adaptive algorithm could detect and respond to reduced insulin sensitivity resulting from corticosteroid administration. For this study, we developed an algorithm that estimates insulin sensitivity at regular intervals and responds to those changes. This algorithm is termed the adaptive proportional-derivative (APD) system and, based on insulin sensitivity, adjusts the gain factors used in a fading memory proportional-derivative (FMPD) algorithm that we used in an earlier study.7 The oral corticosteroids that we administered induce insulin resistance in peripheral tissues (muscle, fat) and in the liver.2023 Our goal was to compare glucose control using the APD algorithm vs the FMPD algorithm.


To qualify for inclusion, the T1DM subjects were required to be 21–65 years of age and managed on insulin pump therapy. Age was 46 ± 11 years and hemoglobin A1c (HbA1c) was 7.2 ± 0.3%, both mean ± standard deviation (SD). Women of childbearing potential were required to have a negative urine pregnancy test and to agree to use contraception during the study and for at least 1 month after the study. Severe anemia, bleeding disorder, active malignancy, foot ulceration, and overt disease of the kidneys, liver, heart, and blood vessels disqualified potential participants. Because of abnormal insulin kinetics in such situations,8 antiinsulin antibody titers that exceeded 100 munits/ml (Esoterix, Inc., Calabasas Hills, CA) were also deemed exclusionary (three potential subjects were excluded for high titers). Subjects were recruited from the greater Portland, Oregon region. For additional details of inclusion and exclusion criteria, please contact the corresponding author. Subjects (n = 14) were each studied on two occasions, as described later, for a total of 28 experiments, each lasting for 33 h.

General Study Design and Questions

There were two 33 h experimental arms to this study. During both experiments, subjects received oral hydrocortisone every 4 h to reduce insulin sensitivity. The first (loading) dose was 40 mg, given at minute 180, and the subsequent six doses were 20 mg. Hydrocortisone was chosen because its disappearance half-life is shorter than that of other steroids such as dexamethasone, allowing for a more rapid return to normoglycemia in subjects at the end of the study. During one arm, glucose was controlled for the first 13 h using the FMPD algorithm employed in an earlier study.6 This algorithm incorporates the glycemic history, feeding exponentially-weighted errors of proportional and derivative components (see Appendix A for further details). The increase in insulin infusion rate during prolonged hyperglycemia, resulting from the weighted glucose memory, offers a degree of adaptability to this algorithm. In this arm, for the final 20 h, a novel indirect adaptive algorithm was used, described further later, during which total body insulin sensitivity is estimated every 30 min. This APD algorithm increases gain factors for insulin delivery when insulin sensitivity is found to be decreasing and vice versa. This two-stage arm is abbreviated as FMPD → APD. Each subject also participated in another arm, also 33 h in length, during which the adaptive algorithm was used exclusively, referred to as the APD-only arm. The order of the two for each subject was randomized.

Aspart insulin was used for both arms (Novo Nordisk, Princeton, NJ) and was delivered by a portable insulin pump (Paradigm® 522/722, Medtronic, Minneapolis, MN). Intermittent delivery of small doses of glucagon using high gain factors to prevent hypoglycemia, as reported earlier,7 was part of both arms and employed an FMPD control strategy designed to use a short glucose memory. Glucagon was delivered by a hospital fluid pump (Medfusion® 2001, Smiths Medical, Dublin, OH). Every 8 h, the glucagon pump was reloaded with freshly reconstituted glucagon (GlucaGen®, Novo Nordisk, Princeton, NJ) at a concentration of 0.33 mg/ml and diluted in sterile deionized water. Both insulin and glucagon were delivered subcutaneously. In terms of glucagon delivery, there was one novel element added for this study in both arms: glucagon dosing was increased linearly with increases in insulin-on-board (IOB) estimates. This change was instituted after we observed impaired efficacy of glucagon when IOB was high in a previous study.31

For each closed-loop study, subjects arrived at the research unit after fasting overnight. Meals were given 1, 5, 10, 25, and 29 h after beginning the study (breakfast, lunch, dinner, breakfast, and lunch). By using body weight and gender, the calorie count was calculated to be weight-maintaining as reported earlier.7 The macronutrient content was 50% carbohydrate, 20% protein, and 30% fat. Meals were announced to both algorithms, which triggered delivery of a premeal priming bolus consisting of 60% of the subject’s usual premeal insulin bolus. Meal boluses were calculated by dividing estimated total daily insulin requirement (TDIR) by 570 to determine the insulin to carbohydrate ratio.

Due to ethical considerations (risk for protracted hyper-glycemia), the FMPD algorithm was not used longer than 13 h. One of the study physicians was in attendance in the research facility room at all times. A registered nurse manually adjusted the insulin and glucagon pumps every 5 min every time glucose sensor data were received.

An Investigational Device Exemption was obtained from the FDA prior to initiating the study. Written approval was also obtained from the Legacy Health System Institutional Review Board.

This study design allowed for several questions to be addressed: (1) During the first 13 h of the FMPD → APD (when the FMPD was operative) and APD-only (when the APD was operative) experiments, is the glycemic control better with the adaptive algorithm? (2) In the APD-only arm, did glycemic control improve over time as the algorithm adapted to the steroid-induced hyperglycemia? More specifically, was postprandial control on day 2 tighter than the comparable time period on day 1? The meal used on each day for this comparison was the lunch meal since there was no dinner on day 2 and control after breakfast on day 1 was more a reflection of prestudy insulin delivery than the closed-loop delivery.

Sensed Glucose and Reference Glucose Measurement

Each subject wore two continuous glucose monitoring (CGM) systems (SEVEN® PLUS, Dexcom, Inc., San Diego, CA). These were inserted subcutaneously in the abdomen 14–20 h prior to the beginning of the closed-loop portion of the study. The sensors were calibrated during the closed-loop study with HemoCue® 201 glucose values obtained every 6 h. The sensor with the lowest absolute relative difference (ARD) at the time of the first calibration was chosen to serve as the one to provide glucose data every 5 min to the algorithm controller, which was implemented on a notebook computer. Every 5 min, the algorithm computed insulin and glucagon rates, which were manually keyed into the insulin or glucagon pumps, respectively, by a registered nurse.

During the closed-loop study, an intravenous catheter was placed in a forearm vein and the arm warmed to arterialize the blood and facilitate blood withdrawal. Every 10 min, a small volume blood sample (0.1 ml) was obtained by use of a blood-sparing, double stopcock method and used for measurement of reference glucose by the use of a bedside device. This device (HemoCue 201, HemoCue Inc., Cypress, CA), in our laboratory, has a coefficient of variation of <2%. Based on HemoCue glucose data, the accuracy of the sensed data was measured every 10 min. If the ARD (for blood glucose ≥75 mg/dl) or absolute difference (AD) (for blood glucose <75 mg/dl) over the prior 30 min exceeded 30%, algorithm control was switched to the other sensor if its accuracy was lower than 30%. If ARD/AD for both sensors exceeded 30%, both were recalibrated.

Subjects were treated for hypoglycemia with oral carbo-hydrate (15 g) if blood glucose fell below 60 mg/dl and with intravenous dextrose (10 g) if glucose fell below 50 mg/dl.

Algorithm Description


For both algorithms, the gain factors were based on TDIR (units/day). For the FMPD algorithm, the TDIR was fixed at the outpatient level (adjusted upward for HgbA1c if over 7% by increasing TDIR by 7% per HbA1c percentage point >7%); thus, the gain factors were fixed. For the APD algorithm, TDIR was adjusted every 30 min, leading to frequent updates in the gain factors and basal insulin infusion rate (IIR).

FMPD System

Equations for both algorithms are given in Appendix A. A brief description is given here. The first sensor glucose value of the study was used to initialize the proportional and derivative errors (PE and DE, respectively) for the insulin and glucagon subsystems. The TDIR value was used to initialize IOB and basal IIR. Proportional and derivative gain factors are directly related to the magnitude of TDIR. When IOB exceeded 20% of the TDIR, the IIR was reduced to 0 as a precautionary measure to prevent excess insulin delivery. Also, a maximum glucagon dose per 50 min period (in mg/kg) was defined based upon the current IOB value such that glucagon infusion would be in refractory mode for the remainder of the 50 min period once that dose was exceeded. The glucagon delivery system and refractory period ensure that glucagon delivery is front-loaded, which we have observed to be more effective than slower delivery with lower gain factors.7

Hypoglycemia precautions as part of the protocol included reduction in IIR to 25% of calculated value for 40 min if oral carbohydrates were required and to 0% for 20 min if intravenous dextrose was required. Additionally, if glucagon was called for and reached the maximum allowed dose (i.e., glucagon delivery was in the refractory period), IIR was reduced to 25% of the calculated value for 40 min.

APD System

The adaptive controller utilized a validated gluco-regulatory model from Hovorka and colleagues32,33 that serves to periodically estimate tissue insulin sensitivity. A schematic comparison of the FMPD and the APD systems is shown in Figure 1. For the APD system, we programmed the estimates of insulin sensitivity to automatically adjust the TDIR, which in turn, modifies the gain factors and basal rate. Appendix A includes descriptions and a diagram of the model of carbohydrate metabolism, insulin action, system equations, rate constants, parameters, and compartment descriptions. Insulin sensitivity was first estimated at 90 min and every 30 min thereafter. The measure of insulin sensitivity was a composite of the three major actions of insulin as described in Hovorka and colleagues.32 A value of composite insulin sensitivity considered to be normal was arbitrarily set to be 100%.

Figure 1
Control diagrams of the FMPD algorithm and the indirect APD algorithm showing major system elements. The FMPD algorithm is preserved in the body of the APD algorithm.

By comparing the effect on glycemia of insulin sensitivity (over a range from 10 to 200% of the nominal values), nonlinear least squares estimation of the subject’s sensitivity was determined by comparing predicted glucose data to the actual glucose data obtained. After the closest approximation of tissue sensitivity was determined, a new TDIR was calculated based on a relationship between the tissue sensitivity (as a percent of nominal) and the basal IIR required to maintain the glucoregulatory model at steady state for the given sensitivity value.

TDIR Determination

Steady-state analyses tested in the MATLAB® Simulink® (MathWorks, Inc., Natick, MA) environment helped determine the relationship between basal insulin infusion and tissue sensitivity to insulin, with a goal of maintaining glucose levels at the desired target value. For different target values, an exponential relationship between percent composite sensitivity (a composite of the three insulin sensitivity factors) and TDIR was identified, as shown in Figure 2. The increase in TDIR was limited to 6% of the prior TDIR value obtained 30 min earlier (up-governor setting) and TDIR decrease was limited to 12% of the prior TDIR value (down-governor setting). The TDIR governors purposely minimized the rate at which changes in sensitivity are allowed to change gain factors and basal insulin rate. During the planning phase of this project, we found that if not buffered by governors, the TDIR could change substantially and frequently in the setting of noisy inputs such as unstable glucose sensors. The reason that the down-governor is larger in magnitude than the up-governor is to limit the increase in TDIR when sensitivity falls in order to minimize the risk of hypoglycemia and to allow a greater decrease in TDIR when sensitivity begins to rise again.

Figure 2
In creating the APD algorithm, estimates of insulin sensitivity obtained every 30 min lead to a TDIR, as shown. The change in TDIR leads to changes in the gain settings and in basal rate provided through the FMPD controller.

Simulation Studies

To test the adaptive capability of the system, coding of the model was carried out in Visual Basic for Applications (Microsoft Corp., Redmond, WA) and in MATLAB v9 with Simulink followed by simulations that utilized the FDA-approved 300-person in silico simulator developed at the University of Virginia.18,34 Glucose prediction curves and control variability grids were obtained, defining the glucoregulatory capability of the system, an example of which is shown in Figure 3. In this early example, the simulation showed no hypoglycemia in all subjects but an unacceptable degree of hyperglycemia in some subjects.

Figure 3
A simulation, using an early version of the APD algorithm. This simulation used the Kovatchev/Cobelli simulator of carbohydrate metabolism as described in the text. It can be seen that this version of the algorithm, although it prevented hypoglycemia, ...


For independent comparisons, Student’s t-test was carried out with a significance level of .05. For interdependent repeated measures (e.g., repeated frequent measures of glucose levels over an extended period of time), generalized estimating equations were used with the same significance criterion. Data are presented as mean ± standard error of the mean (SEM) unless otherwise indicated.


The model identified a consistent decline in insulin sensitivity resulting from the hydrocortisone administration. To understand the degree to which hydrocortisone reduced insulin sensitivity, we plotted in Figure 4 the composite insulin sensitivity over time during the first 13 h in the APD-only arm (sensitivity was not estimated during this time in the FMPD → APD arm). In the early part of this period, from 0–7 h, before the effects of hydrocortisone were apparent, insulin sensitivity averaged 100–120%. From hour 9 (the time at which the effect of the hydrocortisone reached maximal), to hour 13, insulin sensitivity averaged only 55–75%, a decline of 40–50%. Another way of understanding the hydrocortisone effect is to compare the sensitivity values obtained before adaptation (first 13 h) to sensitivity after adaptation in the FMPD → APD arm. In this arm, the algorithm was programmed to consider sensitivity frozen during the first 13 h at the starting level (which was 89 ± 7% in these subjects) based on the outpatient TDIR (51 ± 5 units per day in these subjects). During the final 20 h in this arm, the sensitivity (measured every 30 min by the APD algorithm) had fallen to an average of 39 ± 4% (p < .001 vs first 13 h). Commensurate with the decline in insulin sensitivity, the APD algorithm raised TDIR to an average of 88 ± 6 units per day (p < .001 vs first 13 h).

Figure 4
A graph of blood glucose and IIR during the first 13 h in the controlled arm of the study, which compares the FMPD and the APD algorithms. Glycemic control is significantly tighter in APD-only arm, as described in the text. In addition, insulin sensitivity, ...

Despite substantial insulin resistance due to hydro-cortisone, the degree of glycemic control after adaptation was initiated was generally satisfactory. When data were analyzed on day 2 (allowing substantial time for adaptation in both arms), the premeal blood glucose levels in the APD-only arm and in the FMPD → APD arm averaged 138 ± 10 and 147 ± 8 mg/dl before breakfast and 167 ± 17 and 143 ± 16 mg/dl before lunch. Taking all premeal blood glucose values together on day 2 for both arms, blood glucose averaged 148 ± 6 mg/dl.

Figure 4 also shows pre- and postmeal glycemic control with the FMPD → APD vs APD-only arms for the controlled part of the study (first 13 h). Several hours after beginning the study, venous glucose tended to be lower in the APD-only arm. Taking this time period as a whole, the difference was significant using generalized estimating equations (p = .015). On average, the difference in blood glucose was 35–40 mg/dl before meals and 35–50 mg/dl 2 h after the meals.

The study was designed so that the glycemic control after lunch on both days could be statistically compared over time. If the APD algorithm was able to cause a time-related improvement of glucose control, then postprandial levels during day 2 should be lower than the comparable period on day 1. Figure 5 shows the results of this comparison over time in the APD-only arm. On day 1, the first dose of hydrocortisone had been given only 2 h before lunch. Thus, the effect of the steroid in reducing insulin sensitivity was just beginning to be observed in the postprandial period and the APD algorithm had little time to adapt. However, 24 h later, long after the APD algorithm had allowed TDIR to fully compensate, the postprandial glucose increments were substantially lower 3 and 4 h after the meal.

Figure 5
This graph is a comparison (in the APD-only group) of the postprandial increments in blood glucose after lunch on day one vs day two. At hour 3 and hour 4, there was a lower glucose increment on day two, after the system had more time to adapt to insulin ...

To minimize protracted hyperglycemia in these subjects, after the first 13 h, the APD algorithm was used for both arms. Not surprisingly, the differences in glycemic control between the two arms diminished on day 2. Figure 6 shows a comparison of venous glucose values for the entire study duration in both arms. Differences in venous glucose became small and nonsignificant on day 2 (during which the APD algorithm was used in both arms).

Figure 6
A comparison of blood glucose and IIR over the 33 h experiments in both arms. For the first 780 min, one arm used the FMPD algorithm and the other arm used the APD algorithm. For the final 20 h, both arms used the APD algorithm.

Figure 7 shows an individual example from the experiment in which the FMPD algorithm was used for the first 13 h after which the APD algorithm was used. During use of the FMPD algorithm on day 1, the subject’s venous glucose rose to 288 mg/dl after lunch and to 245 mg/dl after dinner. In the overnight period and on day 2, glucose came down as the APD algorithm raised TDIR and gain factors in response to declining sensitivity, which averaged 95% over the first 13 h and only 35% over the final 20 h. Small transient doses of glucagon were given several times, as shown.

Figure 7
An example in one subject of blood glucose values, sensor glucose values, IIR, and glucagon delivery. In general, although two sensor switches were needed, the sensor values reflected the blood glucose values closely. Small doses of glucagon were occasionally ...

This figure is also exemplary of how amperometric glucose sensor data was utilized. Every subject had two sensors in place at all times and if the afferent sensor became inaccurate (ARD of >30%), control was switched to the other sensor if its error was acceptable. In this subject, this switch occurred at minute 360 and back to the original sensor at minute 1,055. It can be appreciated from this tracing that the sensor glucose values utilized for algorithm control were quite similar to the reference glucose levels (see later for sensor accuracy results).

The 13 h portion of the study on day 1 also allowed a comparison of the two algorithms regarding risk for hypoglycemia. For this analysis, the first 180 min are excluded due to the possibility of a spillover effect from insulin self-administered prior to admission. In the FMPD → APD arm, the percentage of reference venous glucose values (obtained every 10 min) below 50 mg/dl and below 60 mg/dl was 0 and 0.1%, respectively. The comparable values in the APD-only arm were 0.4 and 0.6%, respectively. At neither level was the difference significant.

To prevent hypoglycemia, glucagon was intermittently called for in low doses by the FMPD system. Since glucose tended to be high as a result of the corticosteroid administration, glucagon was not used as often as in our earlier study.7,31 Over the course of the 28 experiments, glucagon was administered 70 times and the duration of administration was typically 5 or 10 min at a mean rate of 16 mg per minute. When the hour after glucagon administration was examined for efficacy, glucose did not fall to <70 mg/dl in 80% of cases and did not fall to <60 mg/dl in 86% of cases.

The accuracy of the glucose sensors was compared to the venous glucose as measured by the HemoCue. The mean ARD value for the preferred sensor used to control the algorithm was 9.6 ± 0.5% and for the unpreferred sensor was 12.2 ± 0.8%. The corresponding measures of bias (relative difference) revealed a slight negative bias on average: -4.6 ± 0.9% and -4.4 ± 1.3%. On average, the number of times that poor accuracy led to a change in the sensor used to control the algorithm was 1.04 times per 33 h experiment.


In our study, after hydrocortisone was initiated, the model consistently identified a fall in composite insulin sensitivity. The effect of hydrocortisone was not immediate; instead, there was about a 4 h delay before sensitivity started to decline. The magnitude of the fall in insulin sensitivity was substantial; it typically fell 40–50% from the original presteroid level. Quantitatively, the degree of impairment of insulin sensitivity that we found was very similar to the hydrocortisone-induced impairment at physiologic insulin levels as measured by the euglycemic clamp technique in the classical studies of Rizza and colleagues.23 The delay between the first dose of hydrocortisone and the decline in insulin sensitivity is reminiscent of the study by Schneiter and colleagues showing insulin resistance in humans only after many hours of dexamethasone treatment.35

It should be noted that the model’s estimation of insulin sensitivity is not simply related to hyperglycemia. If it were, meals would cause substantial declines in insulin sensitivity. In our system, the glycemic effect of meals is taken into account by the model and each meal is announced during the experiments. Meal announcement plays an important role in the system; other authors have shown the benefit of a hybrid system that includes premeal announcement and insulin boluses.11 Without announcement, the subcutaneous delay of insulin absorption may prevent adequate postprandial control, as indicated in our earlier simulations using the University of Virginia model (not shown). In the future, fast-acting insulin preparations or analogs may prove premeal insulin boluses unnecessary.

In response to the substantial fall in insulin sensitivity in our study, the algorithm appropriately increased the gain factors that led to satisfactory glycemic control. Taking both experimental arms together, the premeal glucose levels averaged 138–167 mg/dl before meals on the second day, when both arms were adapting to the reduced insulin sensitivity. Although this degree of control is not as tight as some other artificial pancreas studies,10 this degree of control is superior to that usually seen in patients who receive steroids for medical conditions. In such cases, glucose levels are often quite difficult to control and are associated with substantial medical morbidity.36 In general, stress hyperglycemia is a serious acute complication of diabetes.13 It is difficult to directly compare the glycemic control achieved with this (APD) algorithm to that achieved with other adaptive algorithm because we are unaware of comparable studies in which corticosteroids were used to create insulin resistance.

The first 13 h of the study represents the controlled part of the study. Each subject was studied once with only the response offered by the FMPD algorithm and once with the APD algorithm during which the gain factors were automatically adjusted according to frequently measured insulin sensitivity.

During the portion of the study in which the algorithms were compared, the first 13 h, we found that glycemia was lower with the adaptive algorithm than with the FMPD algorithm, and the difference averaged 35–50 mg/dl. This finding suggests that the APD system was able to keep glucose under better control than the FMPD system. Although the indirect adaptive algorithm performed better in this study, these results do not prove an inability to adapt in all systems with proportional and derivative elements. There are many ways to tune such systems and there are ways to increase the adaptability to a greater extent than was used in our study. For example, the degree to which the glycemic history is taken into account allows such systems to adapt to protracted hyperglycemia. In our FMPD system, more vigorous adaptation to hyperglycemia could have been implemented by utilizing a shallower rate of decline for the exponential decline in the glycemic history that is utilized for proportional and derivative gains (z factor, as described).7 One drawback to utilizing such a slow exponential decline is that although responsiveness to prolonged hyperglycemia improves, the ability to respond to rapid glycemic fluctuations declines.

Although it would have been interesting to continue the controlled comparison portion of the study for a longer period, we elected to carry out this controlled comparison for a relatively short (13 h) period of time for ethical and safety reasons in order to minimize marked hyperglycemia. After this time point, all subjects in both arms were controlled with the APD algorithm.

By design, the APD algorithm does not fully adapt to the corticosteroid-induced insulin resistance immediately. To avoid instability from noisy data, the TDIR governors are designed to minimize the rate at which changes in sensitivity are translated into changes in gain factors and basal insulin rate. There is a trade-off between the magnitude of the governor settings, which retard the response in TDIR and the ability to quickly respond to changes in insulin sensitivity. We acknowledge that the current tuning may not be appropriate to adapt to all changes in insulin sensitivity. For example, it can be seen in Figure 4 that hyperglycemia (glucose over 200 mg/dl) usually occurred after the last meal of the first day. This degree of postprandial hyperglycemia might have been less with a more quickly responding algorithm. Another situation that requires a fast response would be intense exercise, which can quickly lead to large changes in insulin sensitivity and noninsulin-mediated glucose uptake. Such changes might lead to hypoglycemia in the absence of a quickly responding system of adaptation.

To prevent hypoglycemia, glucagon was intermittently given during incipient hypoglycemia. The parameters for administering glucagon were similar to those utilized in an earlier study,7,31 except that in the current study, additional glucagon was given when estimated IOB levels were elevated. The success rate of glucagon in this study was 80% when a hypoglycemic criterion of <70 mg/dl was used, and 86% with a criterion of <60 mg/dl. This success rate is slightly greater than in the earlier study, probably due to the dose increase for high IOB, which was common due to the corticosteroid-induced insulin resistance.

In terms of the sensor data, we found that the sensors were generally quite accurate, especially with the use of our method in which the algorithm-controlling sensor can be switched when accuracy is suboptimal. Frequent calibration (every 6 h) may have also been beneficial, as we reported earlier.37

We conclude that (1) corticosteroids consistently produced tissue resistance to insulin, which was reliably detected and quantified by the model; (2) in response to the steroids, the APD algorithm consistently raised TDIR and raised the control gain factors, leading to higher insulin infusion rates; (3) the elevated insulin infusion rates provided by the APD algorithm led to lower glucose levels than those observed during the comparable period of the FMPD algorithm, and (4) the APD algorithm did not increase the incidence of hypoglycemia as compared to the FMPD algorithm.


We gratefully acknowledge the following granting agencies: Juvenile Diabetes Research Foundation (#22-2009-800), Legacy Good Samaritan Foundation, and National Institutes of Health for support of Dr. Jessica R. Castle (#T32 DK007674).



absolute difference
adaptive proportional-derivative
absolute relative difference
continuous glucose monitoring
derivative error
endogenous glucose production
Food and Drug Administration
fading memory proportional-derivative
hemoglobin A1c
insulin infusion rate
noninsulin-mediated glucose uptake
not significant
proportional error
standard deviation
standard error of the mean
type 1 diabetes mellitus
total daily insulin requirement
venous blood glucose

Appendix A

General Algorithm Description

For both algorithms, the gain factors were based on TDIR (units/day). For the FMPD algorithm, the TDIR was fixed at the outpatient level (adjusted upward for HgbA1c if over 7%); thus, the gain factors were fixed. For the indirect adaptive algorithm, TDRI was adjusted every 30 min, leading to frequent updates in the gain factors and basal IIR.

FMPD System

The first sensor glucose value of the study was used to initialize the proportional and derivative errors (PE and DE, respectively) for the insulin and glucagon subsystems based on Equations (A1) and (A2). The TDIR value was used to initially calculate IOB and basal IIR as given in Equations (A3) and (A4). New glucose values were then used to determine insulin and glucagon infusion rates based upon Equation (A5).

equation m1
equation m2
equation m3
equation m4
equation m5

Gt and Gt-1 are the glucose values (mg/dl) for the current and prior time intervals, respectively, Gsp is the glucose target (mg/dl), kPE and kDE are the exponential decay constants (min-1) for the PE and DE respectively, k is the exponential decay constant (min-1) for subcutaneously administered insulin, KPE and KDE are the gain coefficients for the PE [insulin system: (units/h)/(mg/dl), glucagon system: (μg/h)/(mg/dl)] and DE [insulin system: (units/h)/﹛(mg/dl)/h﹜, glucagon system: (μg/h)/﹛(mg/dl)/h﹜], respectively, WPE and WDE are the weighted errors, c represents the look-back interval (90 min for insulin PE and DE, 15 min for glucagon PE, and 10 min for glucagon DE), and It represents the amount of insulin in units infused during the current time interval calculated from the IIR in units/h. KPE and KDE were also adjusted based upon the TDIR value, such that

equation m6

When IOB exceeded 20% of the TDIR, the IIR was set to 0 as a precautionary measure to prevent overinsulinization. Also, a maximum glucagon dose per 50 min period (in μg/kg) was defined based upon the current IOB value such that glucagon infusion would be in refractory mode for the remainder of the 50 min period once that dose was exceeded. The glucagon delivery system and refractory period ensure that glucagon delivery is front-loaded, which we observed in another study to be more effective than slower delivery.7

equation m7

Hypoglycemia precautions included reduction in IIR to 25% of calculated value for 40 min if oral carbohydrates were required and to 0% for 20 min if intravenous dextrose was required. Additionally, if glucagon was called for and reached the maximum allowed dose (i.e., glucagon delivery was in the refractory period), IIR was reduced to 25% of the calculated value for 40 min.

APD Controller

The adaptive controller utilizes a validated glucoregulatory model from Hovorka and colleagues32 that serves to estimate tissue insulin sensitivity and, accordingly, adjusts the TDIR value provided to the insulin/glucagon controller. Figure A1 shows the model of carbohydrate metabolim and insulin action represented by the following system equations:

Figure A1

An external file that holds a picture, illustration, etc.
Object name is dst-05-1312-g008.jpg

In this diagram, Q1 and Q2 represent the measurable and unmeasurable glucose compartments, Qi1a, Qi1b, and Qi2 represent subcutaneous insulin compartments where Qi1a and Qi2 model a slow pathway of insulin absorption and Qi1b models a fast pathway. Qi3 and compartment I are interchangeable plasma insulin compartments, while the insulin action compartments shown represent effects on glucose distribution to (x1) and utilization (x2) by insulin-sensitive tissues, as well as suppression of EGP (x3). NIMGU = noninsulin-mediated glucose uptake.

equation m8
equation m9
equation m10

where UG is the absorbed carbohydrate (mmol/kg/min), DG is the carbohydrate content of the meal (in mmol/kg body weight), AG is the percentage of the meal carbohydrate absorbed and tmax,G is the time to maximum carbohydrate absorption.

equation m11
equation m12
equation m13
equation m14
equation m15
equation m16
equation m17
equation m18
equation m19
equation m20
equation m21
equation m22

Insulin Sensitivity Determination

Sensed glucose and IIR history for the previous 90 min of data, starting at the 90 min time point and then every 30 min thereafter, are input into the model to estimate the tissue sensitivity to insulin (Si) for the patient. In the equations given, Si is represented by the kb rate constants, where kb = Si*ka for the insulin action compartments. By adjusting Si over a range from 10 to 200% of the nominal values, nonlinear least squares estimation of the subject’s sensitivity was determined by comparing predicted glucose data based on Si to the actual glucose data received. Once the closest approximation of tissue sensitivity is determined, a new TDIR is calculated based on a relationship between the tissue sensitivity (as a percent of nominal) and the basal IIR required to maintain the glucoregulatory model at steady state for the given sensitivity value.

TDIR Determination

Simple steady-state analyses within the MATLAB Simulink environment helped determine the relationship between basal insulin infusion and tissue sensitivity to insulin, where the basal rate maintained glucose levels at the desired target value. For different target values, a relationship between percent composite sensitivity (a composite of the three insulin sensitivity factors from the model, termed SC) and TDIR was identified:

equation m23
equation m24

where Arepresents the glucose target adjustment factor.

equation m25

The calculated TDIR value was then limited depending on whether insulin sensitivity increased (with a resulting decrease in the TDIR) or decreased (with a resulting increase in the TDIR). TDIR increase was limited to 6% of the prior TDIR value obtained 30 min earlier (up-governor) and TDIR decrease was limited to 12% of the prior TDIR value (down-governor). The TDIR governors purposely minimize the rate at which changes in sensitivity are translated into changes in gain factors and basal insulin rate. During the planning phase of this project, we found that if not buffered by governors, the TDIR could change substantially, especially in settings with unstable glucose sensors. The reason that the up-governor is smaller in magnitude than the down-governor is to limit the increase in TDIR in order to minimize the risk for hypoglycemia. The exponential relationship between TDIR and composite insulin sensitivity is shown in Figure A1.


Joseph El Youssef, W. Kenneth Ward, and Jessica R. Castle, have patents pending on algorithms designed for use in an artificial endocrine pancreas.


1. Hadjadj S, Coisne D, Mauco G, Ragot S, Duengler F, Sosner P, Torremocha F, Herpin D, Marechaud R. Prognostic value of admission plasma glucose and HbA in acute myocardial infarction. Diabet Med. 2004;21(4):305–310. [PubMed]
2. Levetan CS. Effect of hyperglycemia on stroke outcomes. Endocr Pract. 2004;10(Suppl 2):34–39. [PubMed]
3. Falciglia M. Causes and consequences of hyperglycemia in critical illness. Curr Opin Clin Nutr Metab Care. 2007;10(4):498–503. [PubMed]
4. Greenhalgh DG. Wound healing and diabetes mellitus. Clin Plast Surg. 2003;30(1):37–45. [PubMed]
5. King L. Impaired wound healing in patients with diabetes. Nurs Stand. 2001;15(38):39–45. [PubMed]
6. Jacobsen IB, Henriksen JE, Hother-Nielsen O, Vach W, Beck-Nielsen H. Evidence-based insulin treatment in type 1 diabetes mellitus. Diabetes Res Clin Pract. 2009;86(1):1–10. [PubMed]
7. Castle JR, Engle JM, El Youssef J, Massoud RG, Yuen KC, Kagan R, Ward WK. Novel use of glucagon in a closed-loop system for prevention of hypoglycemia in type 1 diabetes. Diabetes Care. 2010;33(6):1282–1287. [PMC free article] [PubMed]
8. Dassau E, Palerm CC, Zisser H, Buckingham BA, Jovanovic L, Doyle FJ. In silico evaluation platform for artificial pancreatic beta-cell development–a dynamic simulator for closed-loop control with hardware-in-the-loop. Diabetes Technol Ther. 2009;11(3):187–194. [PubMed]
9. El-Khatib FH, Russell SJ, Nathan DM, Sutherlin RG, Damiano ER. A bihormonal closed-loop artificial pancreas for type 1 diabetes. Sci Transl Med. 2010;2(27):27ra27. [PubMed]
10. Hovorka R, Kumareswaran K, Harris J, Allen JM, Elleri D, Xing D, Kollman C, Nodale M, Murphy HR, Dunger DB, Amiel SA, Heller SR, Wilinska ME, Evans ML. Overnight closed loop insulin delivery (artificial pancreas) in adults with type 1 diabetes: crossover randomised controlled studies. BMJ. 2011;342:d1855. [PMC free article] [PubMed]
11. Weinzimer SA, Steil GM, Swan KL, Dziura J, Kurtz N, Tamborlane WV. Fully automated closed-loop insulin delivery versus semiautomated hybrid control in pediatric patients with type 1 diabetes using an artificial pancreas. Diabetes Care. 2008;31(5):934–939. [PubMed]
12. Mauseth R, Wang Y, Dassau E, Kircher R, Jr, Matheson D, Zisser H, Jovanovic L, Doyle FJ., 3rd Proposed clinical application for tuning fuzzy logic controller of artificial pancreas utilizing a personalization factor. J Diabetes Sci Technol. 2010;4(4):913–922. [PMC free article] [PubMed]
13. Atlas E, Nimri R, Miller S, Grunberg EA, Phillip M. MD-logic artificial pancreas system: a pilot study in adults with type 1 diabetes. Diabetes Care. 2010;33(5):1072–1076. [PMC free article] [PubMed]
14. Quiroz G, Femat R. Theoretical blood glucose control in hyper- and hypoglycemic and exercise scenarios by means of an H(infinity) algorithm. J Theor Biol. 2010;263(1):154–160. [PubMed]
15. Chee F, Savkin AV, Fernando TL, Nahavandi S. Optimal H infinity insulin injection control for blood glucose regulation in diabetic patients. IEEE Trans Biomed Eng. 2005;52(10):1625–1631. [PubMed]
16. Zarkogianni K, Vazeou A, Mougiakakou SG, Prountzou A, Nikita KS. An insulin infusion advisory system based on autotuning nonlinear model-predictive control. IEEE Trans Biomed Eng. 2011;58(9):2467–2477. [PubMed]
17. El-Jabali AK. Neural network modeling and control of type 1 diabetes mellitus. Bioprocess Biosyst Eng. 2005;27(2):75–79. [PubMed]
18. Kovatchev BP, Breton M, Man CD, Cobelli C. In silico preclinical trials: a proof of concept in closed-loop control of type 1 diabetes. J Diabetes Sci Technol. 2009;3(1):44–55. [PMC free article] [PubMed]
19. Pretty C, Chase JG, Lin J, Shaw GM, Le Compte A, Razak N, Parente JD. Impact of glucocorticoids on insulin resistance in the critically ill. Comput Methods Programs Biomed. 2011;102(2):172–180. [PubMed]
20. Andrews RC, Walker BR. Glucocorticoids and insulin resistance: old hormones, new targets. Clin Sci (Lond) 1999;96(5):513–523. [PubMed]
21. Venkatesan N, Lim J, Bouch C, Marciano D, Davidson MB. Dexamethasone-induced impairment in skeletal muscle glucose transport is not reversed by inhibition of free fatty acid oxidation. Metabolism. 1996;45(1):92–100. [PubMed]
22. Henriksen JE, Alford F, Ward GM, Beck-Nielsen H. Risk and mechanism of dexamethasone-induced deterioration of glucose tolerance in non-diabetic first-degree relatives of NIDDM patients. Diabetologia. 1997;40(12):1439–1448. [PubMed]
23. Rizza RA, Mandarino LJ, Gerich JE. Cortisol-induced insulin resistance in man: impaired suppression of glucose production and stimulation of glucose utilization due to a postreceptor detect of insulin action. J Clin Endocrinol Metab. 1982;54(1):131–138. [PubMed]
24. Arleth T, Andreassen S, Federici MO, Benedetti MM. A model of the endogenous glucose balance incorporating the characteristics of glucose transporters. Comput Methods Programs Biomed. 2000;62(3):219–234. [PubMed]
25. Wong XW, Chase JG, Hann CE, Lotz TF, Lin J, Le Compte AJ, Shaw GM. Development of a clinical type 1 diabetes metabolic system model and in silico simulation tool. J Diabetes Sci Technol. 2008;2(3):425–435. [PMC free article] [PubMed]
26. Wong XW, Chase JG, Hann CE, Lotz TF, Lin J, Le Compte AJ, Shaw GM. In silico simulation of long-term type 1 diabetes glycemic control treatment outcomes. J Diabetes Sci Technol. 2008;2(3):436–449. [PMC free article] [PubMed]
27. Wilinska ME, Chassin LJ, Hovorka R. In silico testing–impact on the progress of the closed loop insulin infusion for critically ill patients project. J Diabetes Sci Technol. 2008;2(3):417–423. [PMC free article] [PubMed]
28. Chase JG, Suhaimi F, Penning S, Preiser JC, Le Compte AJ, Lin J, Pretty CG, Shaw GM, Moorhead KT, Desaive T. Validation of a model-based virtual trials method for tight glycemic control in intensive care. Biomed Eng Online. 2010;9:84. [PMC free article] [PubMed]
29. Hann CE, Chase JG, Lin J, Lotz T, Doran CV, Shaw GM. Integral-based parameter identification for long-term dynamic verification of a glucose-insulin system model. Comput Methods Programs Biomed. 2005;77(3):259–270. [PubMed]
30. Amrein K, Ellmerer M, Hovorka R, Kachel N, Parcz D, Korsatko S, Smolle K, Perl S, Bock G, Doll W, Köhler G, Pieber TR, Plank J. Hospital glucose control: safe and reliable glycemic control using enhanced model predictive control algorithm in medical intensive care unit patients. Diabetes Technol Ther. 2010;12(5):405–412. [PubMed]
31. Castle JR, Engle JM, El Youssef J, Massoud RG, Ward WK. Factors influencing the effectiveness of glucagon for preventing hypoglycemia. J Diabetes Sci Technol. 2010;4(6):1305–1310. [PMC free article] [PubMed]
32. Hovorka R, Canonico V, Chassin LJ, Haueter U, Massi-Benedetti M, Orsini Federici M, Pieber TR, Schaller HC, Schaupp L, Vering T, Wilinska ME. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol Meas. 2004;25(4):905–920. [PubMed]
33. Wilinska ME, Chassin LJ, Schaller HC, Schaupp L, Pieber TR, Hovorka R. Insulin kinetics in type-I diabetes: continuous and bolus delivery of rapid acting insulin. IEEE Trans Biomed Eng. 2005;52(1):3–12. [PubMed]
34. Magni L, Raimondo DM, Bossi L, Man CD, De Nicolao G, Kovatchev B, Cobelli C. Model predictive control of type 1 diabetes: an in silico trial. J Diabetes Sci Technol. 2007;1(6):804–812. [PMC free article] [PubMed]
35. Schneiter P, Tappy L. Kinetics of dexamethasone-induced alterations of glucose metabolism in healthy humans. Am J Physiol. 1998;275(5) Pt 1:E806–13. [PubMed]
36. Donihi AC, Raval D, Saul M, Korytkowski MT, DeVita MA. Prevalence and predictors of corticosteroid-related hyperglycemia in hospitalized patients. Endocr Pract. 2006;12(4):358–362. [PubMed]
37. El Youssef J, Castle JR, Engle JM, Massoud RG, Ward WK. Continuous glucose monitoring in subjects with type 1 diabetes: improvement in accuracy by correcting for background current. Diabetes Technol Ther. 2010;12(11):921–928. [PMC free article] [PubMed]

Articles from Journal of Diabetes Science and Technology are provided here courtesy of Diabetes Technology Society