Skip to main content
Journal of Diabetes Science and Technology logoLink to Journal of Diabetes Science and Technology
. 2012 Sep 1;6(5):1142–1147. doi: 10.1177/193229681200600519

Inpatient Studies of a Kalman-Filter-Based Predictive Pump Shutoff Algorithm

Fraser Cameron 1, Darrell M Wilson 2, Bruce A Buckingham 2, Hasmik Arzumanyan 3, Paula Clinton 2, H Peter Chase 4, John Lum 5, David M Maahs 4, Peter M Calhoun 5, B Wayne Bequette 1
PMCID: PMC3570849  PMID: 23063041

Abstract

Background

An insulin pump shutoff system can prevent nocturnal hypoglycemia and is a first step on the pathway toward a closed-loop artificial pancreas. In previous pump shutoff studies using a voting algorithm and a 1 min continuous glucose monitor (CGM), 80% of induced hypoglycemic events were prevented.

Methods

The pump shutoff algorithm used in previous studies was revised to a single Kalman filter to reduce complexity, incorporate CGMs with different sample times, handle sensor signal dropouts, and enforce safety constraints on the allowable pump shutoff time.

Results

Retrospective testing of the new algorithm on previous clinical data sets indicated that, for the four cases where the previous algorithm failed (minimum reference glucose less than 60 mg/dl), the mean suspension start time was 30 min earlier than the previous algorithm. Inpatient studies of the new algorithm have been conducted on 16 subjects. The algorithm prevented hypoglycemia in 73% of subjects. Suspension-induced hyperglycemia is not assessed, because this study forced excessive basal insulin infusion rates.

Conclusions

The new algorithm functioned well and is flexible enough to handle variable sensor sample times and sensor dropouts. It also provides a framework for handling sensor signal attenuations, which can be challenging, particularly when they occur overnight.

Keywords: hypoglycemia, Kalman filter, low glucose suspend, pump shutoff

Introduction

One of the disadvantages to tight blood glucose control is the increased risk of hypoglycemia. Hypoglycemic alarms, based on continuous glucose monitor (CGM) technology, have had limited success because of a relatively high false alarm rate and the reality that many patients (and caregivers) sleep through the alarms; Buckingham and coauthors1 found that 71% of alarms were not responded to during sleep. In a clinical trial with 176 subjects for 36,467 nights using a CGM, there was an 8.5% incidence of nocturnal hypoglycemia, with a mean duration of 81 min;2 hypoglycemia was defined as two consecutive CGM readings ≤60 mg/dl in 20 min. A pump shutoff or low glucose suspend (LGS) system, where an insulin pump is shutoff in response to hypoglycemia, is an intermediate step between a hypoglycemic alarm system and a fully closed-loop artificial pancreas.

Pump shutoff or LGS systems can be based on either detection, where the insulin pump is shut off when a glucose threshold is violated, or prediction, where the pump is suspended when a glucose threshold is predicted to be violated within a certain timeframe (prediction horizon). Results using the Medtronic Paradigm Veo pump with a detection-based LGS have been reported by Agrawal and coauthors3 and Choudhary and coauthors.4 Buckingham and coauthors5 used two different prediction-based pump shutoff algorithms using 1 min Abbott Navigator CGM readings.

In previous studies, we developed a strategy to predict hypoglycemia6 based on a voting algorithm that considered the predictions of several different algorithms. This voting algorithm was extended to include pump shutoff and was successfully applied in clinical studies of 40 patients,7 where nocturnal hypoglycemia was induced by using elevated basal rates. Initial studies used a fixed 90 min pump suspension time, while the pump restart criteria for the final studies included a minimum of a 30 min pump suspension, a positive rate of CGM-based glucose change of >0.5 mg/dl/min, and a CGM value >80 mg/dl. Hypoglycemia, defined as a reference blood glucose less than 60 mg/dl, was prevented on 75% of nights and 84% of events.

The studies presented in this article used a single Kalman filter prediction algorithm rather than a voting algorithm. This greatly reduced the algorithmic complexity without reducing performance in our retrospective testing. The Kalman filter approach is flexible, can handle variable sensor sample intervals, and provides a natural framework for handling sensor signal dropout and attenuation.

Predictive Pump Shutoff Based on Optimal Estimation Theory (Kalman Filtering)

When a sensor has measurement noise, it is important that any decision based on a rate-of-change (derivative) of the sensor signal be filtered or averaged. A limitation to simple averaging or smoothing types of filters is that they can add a substantial time delay to the signal. The Kalman filter is an algorithm that includes noise statistics about the sensor and the underlying system based on a model that describes the system behavior. The Kalman filter essentially trades off the probability that a change in the sensor signal is due to sensor noise, with the probability that the change is due to an unmeasured input; in this case, the unmeasured input is a perturbation to the blood glucose rate of change.

In previous papers, we formulated a Kalman filter to estimate and predict blood glucose values in noisy CGM signals.810 A tutorial review of Kalman filtering and other signal processing techniques has been provided by Bequette.11

The proposed pump shutoff algorithm consists of a set of prioritized rules to assure patient safety. The pump is allowed to be off for a maximum of 120 min every 150 min. In addition, the pump can only be off for a maximum of 180 min each night. In the studies reported in this article, we use a 70 min prediction horizon, with an 80 mg/dl threshold for pump shutoff. The pump is turned back on when the 70 min prediction of the blood glucose rises above 100 mg/dl. The Kalman filter algorithm for estimating blood glucose and its rate of change is shown in Appendix A. The algorithm provides glucose (and rate of change) predictions at 1 min intervals, which are updated when a new sensor signal is available (typically at 5 min intervals). Indeed, the glucose predictions continue during sensor signal dropouts. After 20 min of signal dropout, the predictions are gradually reset to a constant 140 mg/dl.

The potential for rebound hyperglycemia was not rigorously assessed in this study. Possible adjustments to the tuning parameters to reduce the potential for rebound hyperglycemia include a reduced prediction horizon and a lower threshold for restarting insulin delivery.

Retrospective Testing on Clinical Data

Before conducting clinical tests of the new algorithm, we first performed retrospective “advisory mode” tests against nocturnal data sets from the previous clinical study.7 For cases where blood glucose data fell into the near-hypoglycemic or hypoglycemic range, our goal was to achieve earlier pump suspension using the new algorithm. For cases where the pump was suspended and glucose levels remained high or increased markedly, our goal was to decrease the number of pump suspensions.

There were four nights where blood glucose fell to 60 mgdl or below, and another four nights where blood glucose fell to 70 mg/dl or below but remained above 60 mg/dl. For the four nights at or below 60 mg/dl, the proposed algorithm retrospectively suspended the pump, on average, 30 min earlier. For all eight cases together, the pump was suspended an average of 23 min earlier.

There were four cases where the reference glucose level increased above 150 mg/dl postsuspension. Retrospectively, the proposed algorithm would have suspended for an average of 88 min less per night in these cases.

Figures 1 and 2 show representative examples of insufficient and excessive actual suspensions. The figures for each of the 16 subjects from the clinical pump shutoff data are shown in Appendix B.

Figure 1.

Figure 1

Comparison of the proposed Kalman-filter-based algorithm with the previous voting algorithm. Note that a sample time for the proposed algorithm is 5 min, while the voting algorithm was based on 1 min samples. In the horizontal lines, green represents regular basal delivery while red represents pump suspension. In this example, the proposed algorithm shuts off the pump 25 min before the voting algorithm did in the clinic, so it is likely that the proposed algorithm would have avoided hypoglycemia.

Figure 2.

Figure 2

Comparison of the proposed Kalman-filter-based algorithm with the previous voting algorithm. In this example, the proposed algorithm shuts off the pump for 71 fewer minutes than the voting algorithm did in the clinic, largely driven by an earlier resumption of basal insulin delivery. It is likely that the glucose level would not have risen as high.

Inpatient Studies: Protocol

At the enrollment visit, each patient signed an institutionally approved informed consent, and they were trained on the Sof-Sensor insertion and calibration and asked to do a minimum of four capillary blood glucose tests each day.

On the night of the Clinical Translational Research Center admission visit, each participant had dinner at home at 6:00 pm and was admitted to the research center at 7:00 pm. The physician initiated a systematic increase in the basal insulin beginning at 9:00 pm to promote negative rate of change in the blood glucose; this same protocol was used by Buckingham and associates.7 The study continued until 7:00 or 8:00 am, with the subjects in a recumbent position. Reference blood glucose samples were taken every 15–30 min, with blood ketone measurements at the study onset, after pump suspension, and before breakfast.

Results and Discussion

A total of 16 subjects were studied, 8 at Stanford Medical Center (Stanford, CA) and 8 at the Barbara Davis Center (Aurora, CO). The glucose values of 1 subject remained elevated throughout the study, so the data analysis is based on 15 subjects.

Hypoglycemia, defined as one or more reference glucose values ≤60 mg/dl, was prevented in 11/15 subjects. Based on CGM readings alone, only 1 subject failed. Three of the reference-based failures (subjects 2, 10, and 16) were due to the sensor having a positive bias of 58, 36, and 25 mg/dl compared with the reference glucose. The last failure (subject 13) was a failure to suspend early enough. The plots for all subjects are included in Appendix C.

For this algorithm to be successful in a real-world setting, it must prevent or mitigate hypoglycemia without inducing prolonged hyperglycemia. This study involved the artificial induction of near-hypoglycemia by increased basal insulin delivery and was not designed to assess the risk of rebound hyperglycemia, and we do not have “control” nights. This will be tested in a subsequent outpatient trial. The peak glucose and last (fasting) glucose at the end of the study are provided in Table 1. Further, the data plots for all 16 patients are provided in Appendix C.

Table 1.

Performance Metrics for 15 Subjects Who Satisfied Study Criteria

Reference metrics from 10:00 pm until end of study

Subject Hypoglycemia occurred Closest glucose at start of longest suspension (mg/dl) Closest glucose at end of longest suspension (mg/dl) Longest suspension time (min) Last glucose (mg/dl) Nadir glucose (mg/dl) Peak glucose (mg/dl)
1 No 96 81 107 138 81 286

2 Yes 80 85 60 134 52 256

3 No 143 134 87 145 128 234

4 No 217 226 50 68 68 352

5 No 163a 163a 41 265 131 265

6 No 95 73 120 105 73 181

7 No 115 79 96 97 69 283

8 No 123 113 120 222 91 222

9 No 107 102 102 92 68 208

10 Yes 100 86 120 114 53 252

11 No 120 96 97 172 83 191

12 No 65 105 60 74 65 158

13 Yes 119 102 96 100 55 151

14 No 99 80 80 127 80 174

15 Yes 82 67 98 197 53 283

Overall (mean) 27% 122b 114b 87b 137b 77 233
a

Same measurement is closest to both start and end of suspension.

b

Mean for nights without hypoglycemia.

Several subjects had sensors that were significantly affected by sensor attenuations. In subjects 4 and 5, these led to inappropriate pump suspensions. The performance of subject 4 was additionally affected by enforcement of the 180 min limit on total pump suspension because of the sensor attenuations.

Since some data sets had multiple suspensions, the data are presented for the longest suspension; the mean value of the longest suspension time for each subject was 89 min. The mean glucose at the start and end of the successful suspensions were 122 and 114 mg/dl, respectively. The mean glucose at the end of the study (morning) for the successful suspensions was 137 mg/dl.

A summary of the results is provided in Table 1. An example of a successful prevention of hypoglycemia is shown in Figure 3, and a failure is shown in Figure 4. Figure 5 shows a series of inappropriate pump suspensions due to periodic sensor attenuation.

Figure 3.

Figure 3

Example where the new algorithm shut off the pump in time to avoid hypoglycemia.

Figure 4.

Figure 4

Example where the new algorithm did not avoid hypoglycemia. Note, however, that there is a severe sensor bias of 58 mg/dl. Based on the sensor reading, hypoglycemia was avoided.

Figure 5.

Figure 5

Example where sensor attenuation significantly affected algorithm performance, inducing inappropriate pump suspensions.

Conclusions

The new predictive pump shutoff algorithm is flexible, allowing variable sample times, and provides a framework for dealing with sensor dropout and attenuation. In an inpatient trial using our previous program for increasing insulin delivery to initiate a hypoglycemic event, the algorithm with pump shutoff prevented hypoglycemia 73% of the nights. This algorithm is currently being tested in the outpatient setting.

Acknowledgments

The system and clinical support by Werner Sauer and Laurel Messer are gratefully acknowledged. Preliminary data were presented at the Advanced Technologies and Treatments for Diabetes 2012 conference in Barcelona, Spain.12

Glossary

(CGM)

continuous glucose monitor

(LGS)

low glucose suspend

Funding

This work was partially supported by Juvenile Diabetes Research Foundation (Grants #22-2011-647, #22-2009-795, #3-2011-80), National Institutes of Health/National Center for Research Resources Clinical and Translational Science Awards (award #UL1 RR025744), and National Institutes of Health (Grant #5R01DK085591-03.

Disclosure

Bruce Buckingham received research support from Medtronic Minimed. David Maahs received grant support from Eli Lilly and Abbott Diabetes Care. Bruce Buckingham, Darrell Wilson, and Peter Chase have received research support from DexCom.

References

  • 1.Buckingham B, Block J, Burdick J, Kalajian A, Kollman C, Choy M, Wilson DM, Chase P. Diabetes Research in Children Network. Response to nocturnal alarms using a real-time glucose sensor. Diabetes Technol Ther. 2005;7(3):440–447. doi: 10.1089/dia.2005.7.440. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Juvenile Diabetes Research Foundation Continuous Glucose Monitoring Study Group. Prolonged nocturnal hypoglycemia is common during 12 months of continuous glucose monitoring in children and adults with type 1 diabetes Diabetes Care. 2010;33(5):1004–1008. doi: 10.2337/dc09-2081. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Agrawal P, Welsh JB, Kannard B, Askari S, Yang Q, Kaufman FR. Usage and effectiveness of the low glucose suspend feature of the Medtronic Paradigm Veo insulin pump. J Diabetes Sci Technol. 2011;5(5):1137–1141. doi: 10.1177/193229681100500514. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Choudhary P, Shin J, Wang Y, Evans ML, Hammond PJ, Kerr D, Shaw JA, Pickup JC, Amiel SA. Insulin pump therapy with automated insulin suspension in response to hypoglycemia: reduction in nocturnal hypoglycemia in those at greatest risk. Diabetes Care. 2011;34(9):2023–2025. doi: 10.2337/dc10-2411. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Buckingham B, Cobry E, Clinton P, Gage V, Caswell K, Kunselman E, Cameron F, Chase HP. Preventing hypoglycemia using predictive alarm algorithms and insulin pump suspension. Diabetes Technol Ther. 2009;11(2):93–97. doi: 10.1089/dia.2008.0032. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Dassau E, Cameron F, Lee H, Bequette BW, Zisser H, Jovanovic L, Chase HP, Wilson DM, Buckingham BA, Doyle FJ., 3rd Real-time hypoglycemia prediction suite using continuous glucose monitoring: a safety net for the artificial pancreas. Diabetes Care. 2010;33(6):1249–1254. doi: 10.2337/dc09-1487. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Buckingham B, Chase HP, Dassau E, Cobry E, Clinton P, Gage V, Caswell K, Wilkinson J, Cameron F, Lee H, Bequette BW, Doyle FJ., 3rd Prevention of nocturnal hypoglycemia using predictive alarm algorithms and insulin pump suspension. Diabetes Care. 2010;33(5):1013–1017. doi: 10.2337/dc09-2303. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Knobbe EJ, Buckingham B. The extended Kalman filter for continuous glucose monitoring. Diabetes Technol Ther. 2005;7(1):15–27. doi: 10.1089/dia.2005.7.15. [DOI] [PubMed] [Google Scholar]
  • 9.Palerm CC, Willis JP, Desemone J, Bequette BW. Hypoglycemia prediction and detection using optimal estimation. Diabetes Technol Ther. 2005;7(1):3–14. doi: 10.1089/dia.2005.7.3. [DOI] [PubMed] [Google Scholar]
  • 10.Palerm CC, Bequette BW. Hypoglycemia detection and prediction using continuous glucose monitoring-a study on hypoglycemic clamp data. J Diabetes Sci Technol. 2007;1(5):624–629. doi: 10.1177/193229680700100505. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Bequette BW. Continuous glucose monitoring: real-time algorithms for calibration, filtering, and alarms. J Diabetes Sci Technol. 2010;4(2):404–418. doi: 10.1177/193229681000400222. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Cameron F, Buckingham BA, Wilson DM, Chase HP, Lum J, Bequette BW. In-patient studies of a predictive low glucose suspend system. Presented at the 5th International Conference on Advanced Technologies and Treatments for Diabetes; February 8-11, 2012; Barcelona, Spain. [Google Scholar]
  • 13.Facchinetti A, Sparacino G, Cobelli C. An online self-tunable method to denoise CGM sensor data. IEEE Trans Biomed Eng. 2010;57(3):634–641. doi: 10.1109/TBME.2009.2033264. [DOI] [PubMed] [Google Scholar]

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

RESOURCES