Skip to main content
Journal of Diabetes Science and Technology logoLink to Journal of Diabetes Science and Technology
. 2015 Oct 30;9(6):1175–1184. doi: 10.1177/1932296815609371

Incorporating an Exercise Detection, Grading, and Hormone Dosing Algorithm Into the Artificial Pancreas Using Accelerometry and Heart Rate

Peter G Jacobs 1,, Navid Resalat 1, Joseph El Youssef 2, Ravi Reddy 1, Deborah Branigan 2, Nicholas Preiser 1, John Condon 1, Jessica Castle 2
PMCID: PMC4667295  PMID: 26438720

Abstract

In this article, we present several important contributions necessary for enabling an artificial endocrine pancreas (AP) system to better respond to exercise events. First, we show how exercise can be automatically detected using body-worn accelerometer and heart rate sensors. During a 22 hour overnight inpatient study, 13 subjects with type 1 diabetes wearing a Zephyr accelerometer and heart rate monitor underwent 45 minutes of mild aerobic treadmill exercise while controlling their glucose levels using sensor-augmented pump therapy. We used the accelerometer and heart rate as inputs into a validated regression model. Using this model, we were able to detect the exercise event with a sensitivity of 97.2% and a specificity of 99.5%. Second, from this same study, we show how patients’ glucose declined during the exercise event and we present results from in silico modeling that demonstrate how including an exercise model in the glucoregulatory model improves the estimation of the drop in glucose during exercise. Last, we present an exercise dosing adjustment algorithm and describe parameter tuning and performance using an in silico glucoregulatory model during an exercise event.

Keywords: exercise, hypoglycemia, glucoregulatory model, energy expenditure, accelerometer, heart rate


While exercise is an important component of a healthy lifestyle for everyone, glucose control during and after exercise is a major barrier to exercising for individuals with type 1 diabetes. Exercise causes increased insulin sensitivity along with rapid uptake of glucose by muscle and other tissues within the body, leading to a sharp decline in glucose levels.1 Artificial endocrine pancreas (AP) systems have the potential to mitigate the risk of exercise-induced hypoglycemia by enabling the automated detection of exercise with adjustment of dosing based on the level and type of exercise. Results from studies aiming to reduce exercise-induced hypoglycemia have been mixed. Stenerson et al showed that insulin suspension based on accelerometery input alone was successful in preventing exercise-induced hypoglycemia in silico,2 but not successful in preventing hypoglycemia in children with type 1 diabetes playing soccer.3 Turksoy et al4 did a study whereby they used a body-worn multisensor physiologic monitor called SensWear Pro3 (BodyMedia Inc, Pittsburgh, PA) that measures physical activity through accelerometry, temperature, and galvanic skin response to adjust dosing during exercise without the need for an exercise announcement. They used accelerometry and skin impedance as inputs to their single-hormone AP to reduce the delivery of insulin during exercise. If glucose was dropping sharply or dropping too low, the system alerted the subject to consume carbohydrates. For 7 runs on 3 subjects, only 1 subject developed hypoglycemia in a single experiment. In certain test runs, carbohydrates were given to the subjects very close to the onset of exercise, thereby reducing the likelihood of developing hypoglycemia. This system was compared with open-loop control in Turksoy et al5 and the authors found a reduction in hypoglycemia using the automated system compared with open-loop control. In a study by Breton et al,6 the addition of heart rate input to modify dosing of a control-to-range single-hormone AP system reduced hypoglycemia from 2 to 0 events in 10 subjects who cycled for 30 minutes. Although both heart rate and data from an accelerometer can be used to detect exercise, both are also prone to false positives (coding an event as exercise when no exercise is taking place). For example, heart rate can be increased in the presence of stress or a fever and accelerometer data can be increased while horseback riding. There remains an unmet need to better detect exercise and reduce exercise-related hypoglycemia.

To reduce the burden on individuals with type 1 diabetes, it is ideal for exercise to be automatically detected rather than requiring manual announcement. A number of prior groups have presented algorithms for detecting and grading exercise; see Butte et al7 for a review. More recently, in the context of use within an artificial pancreas Dasanayake et al8 demonstrated that using heart rate, accelerometry, and the subjects’ glucose levels, that exercise onset for mild and moderate exercise could be detected within 5 minutes for mild exercise and 6 minutes for moderate. Exercise detection algorithms generally fall within 2 categories, linear and nonlinear approaches. Linear models are typically regression models that use features from accelerometers and heart rate monitors as regressor parameters within the model. The output of the model is energy expenditure (EE). Alternatives to the regression model are nonlinear models that rely on supervised training using techniques from machine learning. These models include neural network models, support vector machines, Bayesian classifiers, decision trees, and others.7 While many of the nonlinear classifiers7,9,10 have demonstrated good performance in estimating EE, few authors provide details of the model that enable others to use them. For this reason, the best algorithm to estimate EE within the context of an AP was a regression model, of which all of the parameters have been published.11 In this article, we show results of detecting and grading EE during exercise and nonexercise time epochs in adult subjects with type 1 diabetes on sensor-augmented pump therapy.

Our group has developed a bihormonal AP system (Figure 1) that delivers both glucagon and insulin.12,13 We have shown that including glucagon significantly reduces hypoglycemia as compared to insulin delivery alone14 and hypothesize that it is even more critical during exercise, when glucose levels drop quickly leaving insufficient time for suspension of insulin alone to be effective. We also hypothesize that detection of exercise using heart rate and accelerometry with immediate dosing changes is important, as simply reacting to dropping glucose levels may be ineffective; higher glucagon doses may be required to prevent hypoglycemia. In this article we describe an algorithm that may be used to adjust dosing of insulin and glucagon after exercise is detected. We show how the algorithm was tuned and validated on an in silico model that included pharmacokinetics for insulin and glucagon as well as a meal model and a model for exercise.15-18

Figure 1.

Figure 1.

Hardware components of the OHSU AP. The system is comprised of mostly off-the-shelf components including 2 Tandem pumps, a Dexcom G4 sensor and share AP receiver, and a custom 3D-printed enclosure. A key system component is the control algorithm and intelligent software running on the smartphone app. This software currently runs on a Google Nexus smartphone running an Android operating system.

Methods

Open-Loop in-Hospital Study: Subjects Perform Mild Exercise

As a part of a separate AP system study, 13 adult subjects with type 1 diabetes were each observed in the research center for 22 hours while on sensor-augmented insulin pump therapy (7 pm day 1 to 5 pm day 2). During this time, subjects wore a Zephyr Biopatch (Zephyr Technology, Annapolis) that includes a heart rate monitor and 3-axis accelerometer, a Dexcom G4 CGM system, and their own insulin pump filled with aspart insulin (Novo Nordisk, Plainsboro). Subjects consumed a low-carbohydrate breakfast (20-30 g) at 6 am on day 2, and 2 hours later performed 45 minutes of mild exercise (60% of maximum heart rate). Subjects ate a self-selected lunch 3 hours later and were then observed for an additional 5 hours. Subjects checked blood glucose 4 times daily at a minimum as well as immediately before and after exercise and for symptoms of hypoglycemia or when sensed glucose values were below 70 mg/dL or above 300 mg/dL. The Dexcom G4 CGM system was calibrated every 12 hours.

Detection and Grading of Exercise

A validated linear regression model described by Zakeri et al11 was used to estimate EE in kilocalories/minute. This model uses heart rate (HR), physical activity (PA), as well as Hr2, PA2, and lead/lag versions of HR and PA. A minimal HR and sitting HR was also used within the model. The output of this model is EE and this output may then be used to detect and grade exercise. Detection depends on EE exceeding a certain threshold. We show in the results section how a threshold of 4 kcal/min is a reasonable choice for detecting mild exercise where mild exercise is defined as 60% of the maximal heart rate. Since the output of the model provides actual estimates of EE, we can also grade the level of exercise.

Fitting Glucoregulatory Model to Subject Data Considering Exercise as a Disturbance

We used a model of insulin kinetics,18 dynamics,16 and carbohydrate metabolism;16 we fit 19 model parameters to the open-loop data. Model fitting was done using Matlab’s fmincon (Mathworks, Natick, MA). A constrained minimization was done whereby we set the minimum parameter values to 25% and the maximum to 175% of those published by Hovorka et al16 and Wilinska et al.18 The objective function was the mean squared error between the sensed glucose and the model estimate of glucose after the first 100 minutes of the study, to enable the system and the model time to stabilize. Next we included an exercise model presented by Hernandez-Ordonez et al15 within the glucoregulatory model and assessed whether the exercise model enabled a better estimate of the drop in glucose during exercise compared to without the exercise model. The Hernandez-Ordonez et al model takes the percentage of VO2 maximum (PVO2max) and the percentage active muscle mass (PAMM) as inputs and calculates the change in hepatic glucose production (HGP), peripheral glucose uptake (PGU), and peripheral insulin uptake (PIU). Specifically, the insulin action on glucose distribution (x1), disposal (x2), and EGP (x3) in Equation 7 within Hovorka et al16 are modified using Equation 1.

x.1=ka1x1+MPGU×MPIU×kb1Ix.2=ka2x2+MPGU×MPIU×kb2Ix.3=ka3x3+MHGP×kb3I

whereby MPIU and MHGP are set to 1 during nonexercise. During exercise they are calculated using Equation 2.

MPGU=1+ΓPGUA×PAMM35mg/min;MPIU=1+2.4×PAMM;MHGP=1+ΓHGPA×PAMM155mg/min;

where ΓPGUAand ΓHGPAare the glucose uptake due to active tissue and the glucose production due to active tissue respectively, and assumed to have the same value during short duration exercise and according to Equation 3.

dΓPGUAdt=130ΓPGUA+130ΓPGUA¯;

ΓPGUA¯ is a function of PVO2max according to Equation 4.15

ΓPGUA¯=0.006(PVO2max)2+1.2264(PVO2max)10.1958

Adjusting Insulin and Glucagon Dosing During an Exercise Event

Here we present an algorithm that adjusts the dosing of insulin and glucagon during an exercise event. Following exercise detection or announcement, the system will

  • Turn off insulin for 30 minutes (window A)

  • After the 30-minute shut-off, reduce insulin by 50% (IIRred) for 60 minutes (window B)

  • Increase the glucagon infusion rate by a factor of 2 (GIRinc) during windows A and B

  • Increase target glucose for glucagon from 95 to 110 mg/dl during windows A and B

Table 1 summarizes the parameters that are adjusted after an exercise announcement.

Table 1.

Exercise Model Parameters.

Parameter Description Range Final
Window A (min) Time postexercise during which IIR = 0 0-40 30
Window B (min) Time postexercise when IIR is reduced by IIRred 0-120 60
IIRred Amount insulin is decreased during window B 0-100% 50%
GIRinc Amount glucagon is increased during windows A and B 2a 2
Glucose target Control target during windows A and B for glucagon 110a 110
a

These parameters were determined based on expert clinical recommendations, not through simulation.

In Silico Simulation

The exercise adjustment algorithm parameters were tuned using a statistical virtual-patient population simulator derived from a physiology study recently performed by our group. While the UVA-Padova simulator19 is a powerful FDA approved tool for evaluating control algorithms to be used for clinical studies, the currently available version lacks the ability to simulate an exercise event. We therefore implemented a simulator described previously20 and we fit the critical model parameters to data we acquired from a published study examining the response to glucagon at varying levels of insulin.21 These model parameters consist of 3 glucagon action coefficients as described below, and 1 insulin sensitivity multiplier which is linearly related to insulin sensitivity of distribution, disposal and endogenous glucose production (EGP).

Glucagon Action Model

The glucagon pharmacodynamics model that we used in the in silico simulator as described in Bakhtiani et al20 includes the following components:

  1. Remote compartment for glucagon (eg, accounting for a delay between changes in plasma glucagon and its effect on glucose)

  2. Glucagon and insulin have an additive effect on EGP

  3. The change in glucagon (derivative effect) impacts EGP

The glucagon action model that we used to run our simulations is given in Equation 5 to 8. In these equations, Gg is a function of both the glucagon in plasma, which is represented as Q3g in units of mg/kg, and the volume of glucagon distribution, which is represented as VdGG.

Gg=Q3g×106VdGG

The variable Y represents the glucagon in a remote compartment. This remote compartment introduces a delay component to the model as given in Equation 6.

dYdt=kdY+kcGg

In Equation 6, kd is the glucagon clearance in min-1 from the remote compartment and kc is a measure of “glucagon sensitivity” in (ng/L)-1.min-1. EGP is defined in terms of a baseline EGP (EGP0) as well as the insulin action component (X3) and the glucagon action component (Z).

EGP=EGP0×(1X3+Z)
Z=Y+(kg3×dYdt)

Notice that the glucagon action component is dependent on both the glucagon levels in the remote compartment (Y) and the change in glucose levels in this remote compartment (dY/dt). The amount that the derivative glucagon component contributes to glucagon action is defined in terms of the variable kg3. The variables kc, kd and kg3 are values that change per subject, but VdGG and EGP0 are fixed at 0.0385 (L/kg) and 0.0161 mmol.kg-1.min-1, respectively.

Note that in Equation 7, glucagon action on EGP is affected by an additive component of glucagon and a negative component of insulin, such that when glucagon levels are higher, EGP is also higher. And when insulin levels are lower, EGP is also higher.

Virtual Patient Population Fit to Physiology Data

The simulation models that we used for in silico simulations are shown in Figure 2. We utilized an insulin pharmacodynamics model reported by Hovorka et al,16 an insulin pharmacokinetics model reported by Wilinska et al,18 a glucagon pharmacokinetics model reported by Lv et al,17 the glucagon action model discussed above, and an exercise model described by Hernandez-Ordonez et al15 and described in the previous section. Subject data from a study of the response to glucagon at varying levels of insulin21 and also open-loop data presented in this article were fit to the model to estimate the model parameters for each subject. In this way, we were able to create virtual patients on which to run in silico AP experiments. While we did not create a simulator to validate this model as has been done by others including Wilinska et al,22 the individual models have been validated in the articles described above and we found that the subjects’ glucose data fit the model well. The goodness of the fit of the data to the model was confirmed by the fact that mean model parameters determined during the fit were close to those specified in the publications on the individual models and because the actual data fit the model predicted data. Table 2 shows the published model parameters and the mean model parameters derived from the fit to our physiology data as well as the percentage deviation. The mean model parameters had a mean absolute percentage error of 17.8 % from those published, but there was not a bias in any direction as the relative percentage error was 3.4%. The highest variability in subject parameters was found in the insulin absorption and action compartments, where in clinical practice this is known to occur, and these remain consistent with the dispersions reported.18 We therefore opted to proceed with these parameters in simulation studies.

Figure 2.

Figure 2.

Block diagram of in silico simulator used to do in silico performance testing. The controller is the previously published fading memory proportional derivative controller (FMPD) algorithm12,13

Table 2.

Model Parameters Compared With Published Values.

Model parameter Parameter name Description Published value Model fit Percentage difference Reference
1 F01 Non-insulin-mediated glucose uptake 0.010 0.0104 7.50 16
2 Vg Distribution volume—glucose 0.160 0.1797 12.30 16
3 K12 Rate constant—glucose compartments 0.066 0.0793 20.17 16
4 Ag Proportion of absorbed carbs 0.800 0.8121 1.51 16
5 tmaxG Time to max carb absorption rate 40.000 48.8385 22.10 16
6 EGP0 Endogenous glucose production base 0.016 0.0158 −1.67 16
7 K Proportion of insulin in slow compartment 0.670 0.7958 18.77 18
8 k1 Rate constant—slow insulin compartment 0.011 0.0113 1.08 18
9 k2 Rate constant—fast insulin compartment 0.021 0.0197 −6.21 18
10 k3 Elimination rate constant—plasma insulin 0.138 0.1735 25.72 18
11 VmaxLD Max velocity of local degradation—insulin 1.930 2.9639 53.57 18
12 kMLD Michaelis constant—insulin 62.600 47.5305 −24.07 16
13 VI Distribution volume—insulin 0.120 0.1443 20.28 16
14 ka1 Removal of effect—glucose distribution 0.006 0.0070 16.37 16
15 ka2 Removal of effect—glucose disposal 0.060 0.0331 −44.91 16
16 ka3 Removal of effect—EGP suppression 0.030 0.0308 2.59 16
17 SfIT Sensitivity—glucose distribution 0.005 0.0046 −9.51 16
18 SfID Sensitivity—glucose disposal 0.001 0.0006 −23.72 16
19 SfIE Sensitivity—EGP suppression 0.052 0.0384 −26.13 16

Figure 3 shows the average glucose data and the model-predicted glucose data (this model did not include the Hernandez-Ordonez et al exercise model). Notice that the residuals were largest during the exercise event; in the results section we show how including the exercise model improves the fit of the data during exercise.

Figure 3.

Figure 3.

Mean glucose data during open-loop data collection across all subjects and mean model estimation across virtual subjects. The model is a reasonable approximation of the actual glucose changes. The model shown above did not include a model for exercise and notice that the highest residual errors are observed during exercise.

Results

Results of Detecting Mild Exercise

Figure 4a is an ROC curve showing the sensitivity and specificity of detecting mild exercise using the Zakeri et al11 regression equation across different EE threshold values. Figure 4a was generated by considering the entire 22-hour open-loop study for each of the 13 subjects. The equation was used to detect exercise in each 5-minute segment of the 45-minute exercise period compared with the 5-minute nonexercise segments in the rest of the study. EE was calculated for each 5-minute time interval during the trials using the Zakeri algorithm along with the heart rate and accelerometry values acquired from the body-worn Zephyr during the study. As the EE threshold used for detecting an exercise event varies, so does the sensitivity and the specificity of the detection. A true positive is when EE exceeded the threshold during a 5-minute segment when the subject was exercising. A false positive is when EE exceeded the threshold during a 5-minute segment when the subject was not exercising. If we selected a threshold for EE of greater than 4 kcal/min to indicate mild exercise (30-50% maximum VO2), then we can detect this mild exercise event with a high sensitivity (97.2%) and specificity (99.5%). An AP system typically doses insulin every 5 minutes, since this is the time when a new glucose reading arrives from a continuous glucose sensor. Exercise can be detected using this approach within this 5-minute window required to make a dosing decision within the context of an AP system.

Figure 4.

Figure 4.

(a) Detection of person exercising at mild levels (60% of their maximum HR) during a 22-hour hospital study. Body-worn HR and accelerometer sensors were used for the detection. (b) Boxplot showing EE both during an exercise event and EE during nonexercise activities.

Energy expenditure was estimated as a percentage of maximum VO2 and the predicted versus the actual EE is shown in Figure 5. The correlation between predicted and actual percentage VO2 was moderate with an r2 of .55 and a mean absolute error of 7.4%.

Figure 5.

Figure 5.

Estimated percentage of maximum VO2 vs actual percentage of maximum VO2 for all 13 subjects tested. Line shows perfect estimate.

Open-Loop Changes in Glucose During Mild Exercise: Model Versus Actual

During the open-loop trial, all subjects’ glucose dropped during the 45 minute exercise event. Each subjects’ blood glucose was measured before and after the exercise event, and the drop in glucose for the subjects is shown as a boxplot in Figure 6 and for each individual subject in Table 3. Also shown in Figure 6 and Table 3 is the amount of drop in glucose predicted by the glucoregulatory model that did not include an exercise model when fit to each individual’s CGM data. Notice that the nonexercise model generally under-predicted the drop in glucose levels during exercise (P < .005). Figure 6 further shows that when exercise is included within the glucoregulatory model, the drop in glucose during exercise is closer to the patient data and is not statistically significant than the actual glucose drops of the subjects as determined using a 1-tailed paired t test (P = .22). An example of the drop in 1 subject (Subject 12) is shown in Figure 7. Notice again how including the exercise in the model improves the fit of the model to this subject’s data.

Figure 6.

Figure 6.

During exercise, patients’ glucose dropped. The glucoregulatory model also showed a drop in glucose, but it was significantly less than the drop measured in patients. When an exercise model was incorporated into the glucoregulatory model, the drop in glucose during exercise was more accurate and not statistically different from the actual drop in glucose.

Table 3.

Drop in Glucose During Exercise.

Subject ID Subject Δglucose (mg/dL) Model Δglucose (mg/dL) Model with exercise Δglucose (mg/dL)
1 47 30 103
2 18 −6 37
3 87 5 10
4 44 −3 85
6 3 −12 30
7 23 −12 15
8 4 14 29
9 62 5 33
11 98 24 113
12 57 −2 19
13 29 −1 13
15 102 34 37
20 126 9 43
Average 54 6 44
Median 47 5 33

Figure 7.

Figure 7.

Glucose drop for subject 12 during exercise. Also shown is the model estimation of subject 12’s glucose drop and a trace showing how the model that includes exercise predicts the drop. Notice that when exercise is included in the model, the estimation is closer to the true drop for this subject.

Results of in Silico Testing and Parameter Tuning of Exercise Dosing Algorithm

Multiple clinical scenarios were used during optimization of the algorithm parameters. Each of the insulin and glucagon parameters described in Jacobs et al12 were optimized as were the parameters for the exercise response model given in Table 1. The outcome measures used to optimize the parameters were in order of priority: (1) minimize time in hypoglycemia, (2) minimize time in hyperglycemia, (3) minimize glucagon delivery, and (4) minimize insulin delivery. As an example of a result of the parameter tuning for the exercise model parameters given in Table 1, we show in Figure 8 how we selected window A and window B (the time periods during which insulin was suspended / reduced, respectively) based on minimizing the amount of insulin and glucagon given during the study and minimizing time spent in hypo/hyperglycemia. The simulation we used to tune the exercise model parameters consisted of the following events: (1) a 60-minute run-in time, (2) a meal of 20 gm carbohydrates (simulated breakfast at 8 am), (3) at 2 hours postbreakfast, exercise at 80% VO2 max, (4) a 4 hours postexercise period, including a lunch of 60 gm carbohydrates at noon. We looked at outcomes 1-4 during 4 hours after the onset of exercise. We ran simulations on the virtual patient population described above for different combinations of window A and window B duration. In Figure 8, the column panels show average time spent in hypoglycemia (y-axis) and duration in hyperglycemia (x-axis) for different window B durations for subjects in the virtual patient population. The different shapes show time spent in hypoglycemia or hyperglycemia for different window A durations. The amount of insulin given is represented by the shade of the shape (darker is more insulin) and the amount of glucagon is represented by the size of the shape (larger is more glucagon). Clearly if window A and window B are both zero (square shape, left-most column), there is no adjustment for exercise. This leads to the longest average time spent in hypoglycemia across the virtual patient population (54 minutes). It also results in smaller amounts of glucagon given (as indicated by the smaller shapes). As window A is increased (eg, the duration during which insulin is completely suspended and glucagon is increased), we observe that less time is spent in hypoglycemia. Time spent in hyperglycemia tends to increase as windows B increases, as expected, given with a longer window B, less insulin and more glucagon is given. However, the difference in time spent in hyperglycemia based on different window B durations is negligible. The optimal time for window A and window B was found to be 30 minutes and 60 minutes, respectively. This optimal window B was also selected based on findings from other groups23 that showed the sharpest drops postexercise happened 60 minutes afterward. The other parameters (IIRred, GIRinc, and target glucose) were selected using the same optimization approach but are not shown in the figure.

Figure 8.

Figure 8.

Exercise algorithm parameter optimization results when minimizing time spent in hypoglycemia (y-axis), time spent in hyperglycemia (x-axis), total glucagon delivered (larger shape is more), and total insulin delivered (dark shading is more insulin).

Discussion

In this article we have (1) demonstrated how a validated regression model using heart rate and accelerometer values can be used with a high level of sensitivity and specificity to automatically detect and grade mild aerobic exercise during an open-loop hospital stay for 13 adults with T1D, (2) provided results on the decline in glucose during mild exercise in the setting of T1D, (3) demonstrated the importance of integrating an exercise model into in silico testing paradigms and ultimately model predictive control (MPC) algorithms because of the improved accuracy in estimating glucose decline during mild aerobic exercise, (4) presented a new exercise dosing adjustment algorithm that calls for increased glucagon and decreased insulin if aerobic exercise is either announced or automatically detected, and (5) described a method for tuning the algorithm and presented in silico testing results of use of the algorithm during closed-loop control.

This study confirmed other studies6 that have shown that even for mild exercise (30-50% of VO2 maximum), glucose can fall rapidly and significantly. Figure 6 shows that the mean drop in glucose was 53 mg/dL. However, there was a wide variation. One subject dropped only 3 mg/dL during the exercise while another subject dropped 126 mg/dL. Such high variability in response to exercise is likely explained by a number of factors including the amount of insulin-on-board, starting glucose, total muscle mass, BMI, age, duration of diabetes, and stress level. Such high variability makes it particularly challenging to adjust dosing during exercise, and future work will need to examine whether such dosing adjustments within an AP system are possible and safe. It is likely that algorithms will need to adapt to the particular patient who is using the AP and respond in a way that accounts for the current environment but also considers prior information that reflects past physiologic responses.

It is important to note the work presented here is only for mild aerobic exercise. Prior work has shown that anaerobic exercise can lead to increases in glucose rather than decreases.24 Any future exercise detection and grading algorithm will need to accurately disambiguate between aerobic and anaerobic exercise. Future work will also need to examine the effectiveness of the exercise dosing adjustment algorithm presented for moderate and high levels of both aerobic and anaerobic exercise. Finally, the current exercise model presented by Hernandez-Ordonez et al may need to be adjusted to account for longer term impacts of exercise. It has been shown that exercise can lead to hypoglycemic episodes 7-11 hours25 and in another study 6-15 hours26 after exercise. Future extensions of exercise models will need to consider both the acute and longer term impacts of exercise on glucose control. A further limitation of this study was with regards to the methods used to run the simulations using a virtual population. Other groups have published articles describing the method of fitting physiologic data to models to create a virtual patient populations for running simulations including those by Haidar et al27 and Wilinska et al,22 for example. While each of the individual models used for insulin kinetics, insulin dynamics, carbohydrate absorption, and exercise have been validated independently, there has not yet been an extensive validation of these models together to form a virtual patient population. However, in a recent publication by our group,28 we used a similar method of generating a virtual patient population by fitting physiologic data to the model, and in that article we included an appendix showing the residuals from the model fits to demonstrate that the model fit. A further limitation of our modeling is that we did not account for the time-varying nature of the model parameters. For example, Visentin et al29 recently showed that insulin sensitivity changes differently for various subjects during the course of a 24-hour period. In the future, we will need to account for the circadian variability of the model parameters, especially insulin sensitivity. Finally, we acknowledge that that the models that we used model the influence of exercise on glucose uptake and production limited to insulin dependent terms only. In the future, we will explore how exercise impacts the non-insulin-dependent terms in the model.

Conclusions

Automated detection and grading of exercise is possible with a high degree of accuracy, at least within an in-hospital setting, using a previously validated regression algorithm. Automating the adjustment of insulin and glucagon dosing in response to exercise is important within an AP system to prevent hypoglycemia. Current exercise models will be critical in supporting such automated detection and dosing.

Footnotes

Abbreviations: ANN, artificial neural network; AP, artificial pancreas; CGM, continuous glucose meter; EE, energy expenditure; EGP, endogenous glucose production; GIR, glucagon infusion rate; HGP, hepatic glucose production; HR, heart rate; IIR, insulin infusion rate; MPC, model predictive control; PA, physical activity; PAMM, percentage active muscle mass; PGU, peripheral glucose uptake; PIU, peripheral insulin uptake; PVO2max, maximum percentage VO2; T1D, type 1 diabetes; fading memory proportional derivative,(FMPD).

Declaration of Conflicting Interests: The author(s) declared the following potential conflicts of interest with respect to the research, authorship, and/or publication of this article: PGJ and JC have a financial interest in Pacific Diabetes Technologies Inc, a company that may have a commercial interest in the results of this research and technology. This potential conflict of interest has been reviewed and managed by OHSU.

Funding: The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by grants from the National Institutes of Health (NIH) (grant 1DP3DK101044). This publication was also supported by Oregon Clinical and Translational Research Institute (OCTRI), grant number UL1TR000128, from the National Center for Advancing Translational Sciences (NCATS) at the NIH. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH.

References

  • 1. Basu R, Johnson ML, Kudva YC, Basu A. Exercise, hypoglycemia, and type 1 diabetes. Diabetes Technol Ther. 2014;16(6):331-337. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2. Stenerson M, Cameron F, Wilson DM, et al. The impact of accelerometer and heart rate data on hypoglycemia mitigation in type 1 diabetes. J Diabetes Sci Technol. 2014;8(1):64-69. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Stenerson M, Cameron F, Payne SR, et al. The impact of accelerometer use in exercise-associated hypoglycemia prevention in type 1 diabetes. J Diabetes Sci Technol. 2015;9(1):80-85. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4. Turksoy K, Bayrak ES, Quinn L, Littlejohn E, Cinar A. Multivariable adaptive closed-loop control of an artificial pancreas without meal and activity announcement. Diabetes Technol Ther. 2013;15(5):386-400. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5. Turksoy K, Quinn LT, Littlejohn E, Cinar A. An integrated multivariable artificial pancreas control system. J Diabetes Sci Technol. 2014;8(3):498-507. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6. Breton MD, Brown SA, Karvetski CH, et al. Adding heart rate signal to a control-to-range artificial pancreas system improves the protection against hypoglycemia during exercise in type 1 diabetes. Diabetes Technol Ther. 2014;16(8):506-511. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7. Butte NF, Ekelund U, Westerterp KR. Assessing physical activity using wearable monitors: measures of physical activity. Med Sci Sports Exerc. 2012;44(1 suppl 1):S5-S12. [DOI] [PubMed] [Google Scholar]
  • 8. Dasanayake IS, Bevier WC, Castorino K, et al. Early detection of physical activity for people with type 1 diabetes mellitus [published online ahead of print June 30, 2015]. J Diabetes Sci Technol. 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9. Rothney MP, Neumann M, Beziat A, Chen KY. An artificial neural network model of energy expenditure using nonintegrated acceleration signals. J Applied Physiol. 2007;103(4):1419-1427. [DOI] [PubMed] [Google Scholar]
  • 10. Staudenmayer J, Pober D, Crouter S, Bassett D, Freedson P. An artificial neural network to estimate physical activity energy expenditure and identify physical activity type from an accelerometer. J Applied Physiol. 2009;107(4):1300-1307. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11. Zakeri I, Adolph AL, Puyau MR, Vohra FA, Butte NF. Application of cross-sectional time series modeling for the prediction of energy expenditure from heart rate and accelerometry. J Applied Physiol. 2008;104(6):1665-1673. [DOI] [PubMed] [Google Scholar]
  • 12. Jacobs PG, El Youssef J, Castle J, et al. Automated control of an adaptive bihormonal, dual-sensor artificial pancreas and evaluation during inpatient studies. IEEE Trans Biomed Eng. 2014;61(10):2569-2581. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13. Gopakumaran B, Duman HM, Overholser DP, et al. A novel insulin delivery algorithm in rats with type 1 diabetes: the fading memory proportional-derivative method. Artif Organs. 2005;29(8):599-607. [DOI] [PubMed] [Google Scholar]
  • 14. Castle JR, Engle JM, El Youssef J, et al. Novel use of glucagon in a closed-loop system for prevention of hypoglycemia in type 1 diabetes. Diabetes Care. 2010;33(6):1282-1287. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15. Hernandez-Ordonez M, Campos-Delgado DU. An extension to the compartmental model of type 1 diabetic patients to reproduce exercise periods with glycogen depletion and replenishment. J Biomech. 2008;41(4):744-752. [DOI] [PubMed] [Google Scholar]
  • 16. Hovorka R, Canonico V, Chassin LJ, et al. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol Meas. 2004;25(4):905-920. [DOI] [PubMed] [Google Scholar]
  • 17. Lv D, Breton MD, Farhy LS. Pharmacokinetics modeling of exogenous glucagon in type 1 diabetes mellitus patients. Diabetes Technol Ther. 2013;15(11):935-941. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. 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. [DOI] [PubMed] [Google Scholar]
  • 19. Man CD, Micheletto F, Lv D, Breton M, Kovatchev B, Cobelli C. The UVA/PADOVA type 1 diabetes simulator: new features. J Diabetes Sci Technol. 2014;8(1):26-34. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20. Bakhtiani PA, El Youssef J, Duell AK, et al. Factors affecting the success of glucagon delivered during an automated closed-loop system in type 1 diabetes. J Diabetes Complications. 2015;29(1):93-98. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21. El Youssef J, Castle JR, Bakhtiani PA, et al. Quantification of the glycemic response to microdoses of subcutaneous glucagon at varying insulin levels. Diabetes Care. 2014;37(11):3054-3060. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22. Wilinska ME, Chassin LJ, Acerini CL, Allen JM, Dunger DB, Hovorka R. Simulation environment to evaluate closed-loop insulin delivery systems in type 1 diabetes. J Diabetes Sci Technol. 2010;4(1):132-144. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23. Garcia-Garcia F, Kumareswaran K, Hovorka R, Hernando ME. Quantifying the acute changes in glucose with exercise in type 1 diabetes: a systematic review and meta-analysis. Sports Med. 2015;45(4):587-599. [DOI] [PubMed] [Google Scholar]
  • 24. Yardley JE, Kenny GP, Perkins BA, et al. Resistance versus aerobic exercise: acute effects on glycemia in type 1 diabetes. Diabetes Care. 2013;36(3):537-542. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25. McMahon SK, Ferreira LD, Ratnam N, et al. Glucose requirements to maintain euglycemia after moderate-intensity afternoon exercise in adolescents with type 1 diabetes are increased in a biphasic manner. J Clin Endocrinol Metab. 2007;92(3):963-968. [DOI] [PubMed] [Google Scholar]
  • 26. MacDonald MJ. Postexercise late-onset hypoglycemia in insulin-dependent diabetic patients. Diabetes Care. 1987;10(5):584-588. [DOI] [PubMed] [Google Scholar]
  • 27. Haidar A, Wilinska ME, Graveston JA, Hovorka R. Stochastic virtual population of subjects with type 1 diabetes for the assessment of closed-loop glucose controllers. IEEE Trans Biomed Eng. 2013;60(12):3524-3533. [DOI] [PubMed] [Google Scholar]
  • 28. Castle J, El Youssef J, Bakhtiani P, et al. Effect of repeated glucagon doses on hepatic glycogen in type 1 diabetes: implications for a bi-hormonal closed-loop system [published online ahead of print September 4, 2015]. Diabetes Care. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29. Visentin R, Dalla Man C, Kudva YC, Basu A, Cobelli C. Circadian variability of insulin sensitivity: physiological input for in silico artificial pancreas. Diabetes Technol Ther. 2015;17(1):1-7. [DOI] [PMC free article] [PubMed] [Google Scholar]

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

RESOURCES