0% found this document useful (0 votes)
52 views15 pages

Bequette 2010 Continuous Glucose Monitoring Real Time Algorithms For Calibration Filtering and Alarms

Uploaded by

Jannah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views15 pages

Bequette 2010 Continuous Glucose Monitoring Real Time Algorithms For Calibration Filtering and Alarms

Uploaded by

Jannah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Journal of Diabetes Science and Technology ORIGINAL ARTICLES

Volume 4, Issue 2, March 2010


© Diabetes Technology Society

Continuous Glucose Monitoring: Real-Time


Algorithms for Calibration, Filtering, and Alarms

B. Wayne Bequette, Ph.D.

Abstract
Algorithms for real-time use in continuous glucose monitors are reviewed, including calibration, filtering of
noisy signals, glucose predictions for hypoglycemic and hyperglycemic alarms, compensation for capillary
blood glucose to sensor time lags, and fault detection for sensor degradation and dropouts. A tutorial on
Kalman filtering for real-time estimation, prediction, and lag compensation is presented and demonstrated via
simulation examples. A limited number of fault detection methods for signal degradation and dropout have
been published, making that an important area for future work.

J Diabetes Sci Technol 2010;4(2):404-418

Introduction

T he ability of individuals with type 1 diabetes to


monitor blood glucose levels has improved tremendously
alarms, but a number of other important algorithms
must be used for a successful alarm strategy. Thus,
over the past four decades. The use of self-monitoring algorithms used for calibration, filtering raw current
of blood glucose (SMBG) meters certainly has led to signals, handling of signal artifacts, compensation of the
a tremendous improvement in glucose monitoring lag between blood and interstitial fluid, and hypo- and
compared to urine strips. Continuous glucose monitoring hyperglycemic alarms are discussed. Closed-loop control
(CGM) has the potential to further reduce mean glucose algorithms are not discussed; reviews of algorithms for a
levels while avoiding the risk of hypoglycemia. It is closed-loop artificial pancreas are discussed elsewhere.1–4
also a necessary component of a closed-loop artificial
pancreas. Background
A goal of this article is to review mathematical algorithms There have been a number of reviews of sensor and
that have been proposed for use in CGM technology. related technologies for continuous glucose monitoring
Because our focus is on minimally invasive, subcutaneous for diabetes applications. Klonoff5,6 provided reviews of
sensors, we do not include an analysis of algorithms for the state of continuous glucose monitoring technology,
noninvasive glucose sensors. Our primary interest is in circa 2004. At that time, the only real-time device
algorithms proposed for hypoglycemic and hyperglycemic approved by the Food and Drug Administration (FDA)

Author Affiliation: Department of Chemical and Biological Engineering, Rensselaer Polytechnic Institute, Troy, New York

Abbreviations: (ANN) artificial neural networks, (AR) autoregressive, (CGM) continuous glucose monitoring, (CGMS) continuous glucose
monitoring system, (FD) finite differences, (FDA) Food and Drug Administration, (FIR) finite impulse response, (FSN-CGM) FreeStyle Navigator
continuous glucose monitoring, (IIR) infinite impulse response, (SMBG) self-monitoring blood glucose

Keywords: alarms, algorithms, blood glucose, calibration, filtering, hypoglycemia, optimal estimation, prediction

Corresponding Author: B. Wayne Bequette, Ph.D., Department of Chemical and Biological Engineering, Rensselaer Polytechnic Institute, Troy,
NY 12180-3590; email address [email protected]

404
Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

for the U.S. market was the GlucoWatch G2 Biographer. The slope and intercept are estimated from
An article by the JDRF CGM Study Group7 summarized
the design and methods used to test the three continuous m=
( y2 − y1 ) b = y2 − mx2 . (4)
glucose monitoring systems (CGMS) currently approved ( x2 − x1 )
by the U.S. FDA for the U.S. market.
Further, when multiple data points are available, then
Skyler provided a comprehensive history of CGM
8 linear regression can be used to fit slope and intercept to
development as an editorial introduction to a special issue data. The assumption is that there is uncertainty in the
on CGM. A tutorial overview of current CGM technology output measurement, and the equation has the form15
was provided by Kerr and Fayers,9 while Oliver and
colleagues10 provided a more comprehensive review of yi = mxi + b + ei , (5)
noninvasive glucose sensor technology. Cox11 provided
a head-to-head comparison of the currently available where the subscript i represents the ith data point.
CGM systems. Standard linear regression techniques find the slope (m)
and intercept (b) that minimize the sum of the squares
of the errors (differences between measurements and
A CGM Standards report12 provided consensus guidelines
model predictions, where ŷi = mxi + b) over N data points
on how CGM data should be presented and compared
between CGM devices, and different glucose measurement N N
2
methods. Important topics included the evaluation of min ∑ ei2 = min ∑ ( yi − ŷi ) . (6)
m,b m,b
threshold alarms, calibration, and sensor and physiological i=1 i=1

lag times. Lodwig and Heinemann13 discussed a number


of important topics related to CGM calibration. Once the sensor is calibrated, the estimated glucose
Hayter and associates14 proposed performance standards concentration is obtained from the sensor current from
of CGM devices, including methods of data analysis
and acceptable rates of false alarms for hypoglycemia. x̂ =
( y − b) . (7)
m
Calibration The correlation coefficient is a measure of the quality
of the model fit; if the correlation coefficient is too low,
Although an objective in diabetes management is the calibration may be deemed unacceptable, requiring
to control blood glucose to near euglycemic levels, additional reference glucose measurements, as discussed
minimally invasive continuous glucose sensors output a in the patent by Goode and colleagues.16 Further, the
signal that is proportional to the interstitial glucose patent by Feldman and McGarraugh17 discussed criteria
value. A calibration algorithm is used to convert the raw for calibration acceptance.
sensor signal, typically in nanoamps, to a blood glucose
estimate (milligrams per deciliter in the United States).
In most cases, a simple linear equation is used Linear regression analysis assumes that the independent
variable is known and that the dependent variable is
y = mx + b, (1) uncertain. If Yellow Springs Instruments glucose data
are used for sensor calibration, this may be a good
where x is the independent variable (usually reference assumption, but standard reference glucose test meters
blood glucose) and y is the dependent variable (usually have substantial error.18 Panteleon and colleagues19
the sensor current). If the y intercept is assumed to be obtained better sensor calibration results (lower mean
known (usually b = 0), then a one-point calibration average deviation of blood and subcutaneous glucose)
can be used to find the sensor sensitivity (or slope, m), when the raw glucose current signal is used as the
where independent variable in linear regression analysis

m = (y – b)/x (2) xi = m' yi + b'+ ei , (8)

and only one sensor signal (y) – blood glucose (x) pair is where the parameters m' and b' are found by minimizing
used. the objective function (where x̂i = m' yi + b')

A two-point calibration is based on the two sensor/ N N


2
glucose pairs, where the subscripts 1 and 2 represent the min ∑ ei2 = min ∑ ( xi − x̂i ) . (9)
m ',b ' m ',b '
i=1 i=1
first and second calibration data points, respectively,
Deming regression is an “error in variables” technique
y1 = mx1 + b
. (3) that assumes uncertainty in both independent and
y2 = mx2 + b dependent variables. Panteleon and associates19 noted

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 405 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

that the two different calibration procedures (reference Discussion


blood glucose vs sensor current signal as independent Basing glucose sensor calibration on SMBG meter readings
variables) provide bounds on the results that would be remains a major weakness of CGM technology. Errors in
obtained using Deming regression. the reference glucose can lead to substantial bias in the
calibrated CGM signal, having an effect for much of a
The findings by Panteleon and colleagues19 were also 24-hour period, depending on the frequency of calibration.
demonstrated by Choleau and associates,20 who showed, It is difficult to incorporate SMBG uncertainty into the
via simulation, that errors in the reference glucose and calibration, based on statistical techniques, because of the
continuous sensor can cause the slope and intercept to small set of data (only a few finger stick measurements
be correlated. In a related paper, Choleau and colleagues21 each day).
used error grid analysis22 to show that the one-point
calibration method is superior to the two-point calibration,
based on rat studies. They also found that two one-
Filtering Raw Sensor Signals
point calibrations yielded nearly as good calibration Virtually all sensors have signal noise that must be “filtered”
as three one-point calibrations. The use of multiple before the signals can be used by any computational
sensor–glucose data pairs and linear regression was not algorithm or real-time display. Continuous glucose sensors
discussed, however. have analog filters to smooth the current output to the
analog-to-digital (A to D) converter, but even these sensor
Usually the time lag between the capillary blood glucose signals are noisy and must be filtered. It is particularly
and the raw sensor signal is neglected by the calibration important to use filtered glucose values for applications
algorithm, so it is important to calibrate when the sensor based on the rate of change of glucose, particularly
glucose signal is relatively constant, assuring that the as these computations are based on differences in
interstitial fluid glucose concentration is in equilibrium successive measurements. This section focuses on digital
with the capillary blood. Aussedat and colleagues23 filtering and does not cover the analog filters that are in
proposed an automated calibration request that detects the sensor hardware.
a “plateau” when the sensor signal has not changed by
more than 1% over a 4-minute window and when the
Median Filters
sensor current for the second calibration point differs
from the first by 2 nA or greater. Studies were conducted A median filter takes the median value of a window of
in rats. N past glucose values

ŷk = median ( yk , yk −1 ,..., yk − N +1 ) (10)


Errors in glucose meter reading, in addition to lags
between blood and interstitial glucose, make it necessary and has the advantage of discarding the effect of
that the two reference blood glucose values differ anomalous values due to “spikes” in the signal. Poitout
significantly when using a two-point calibration. King and and colleagues26 used a median filter based on the
colleagues24 showed how sensor performance varies median of the past five sensor current values.
as a function of the difference in the reference blood
glucose values used for calibration, suggesting that they
Finite and Infinite Impulse Response Filters
differ by >30 mg/dl. Indeed, they found that using two
values separated by 40 mg/dl led to nearly the same The most common filtering algorithms are finite and infinite
performance as a retrospective calibration over a large impulse response filters. A finite impulse response (FIR)
number of glucose values. filter has the form

ŷ = a0 yk + a1 yk −1 +  + aM yk − M , (11)
The DirecNet Study Group25 evaluated factors affecting  k
calibration of the Medtronic CGMS. Sensor accuracy was where y represents the measured glucose value and ŷ
improved slightly with more calibrations per day; also, the filtered value. A simple example is a moving average
accuracy was degraded when calibrating with glucose filter, with all data points in the data window weighted
rates of change ±1.5 mg/dl/min. Another finding was equally. For example, with a window of five samples,
that overnight sensor accuracy was improved if only the following fifth-order filter
overnight calibrations were used; it is suggested that a
separate calibration algorithm be used for overnight ŷk = 0.2yk + 0.2yk −1 + 0.2yk − 2 + 0.2yk − 3 + 0.2yk − 4 (12)
reading. Finally, it should be noted that the calibrations
were retrospective, but the authors suggested that similar would create an effective delay of the order of 2.5 sample
improvements would be expected from prospective times. Panteleon and colleagues19 cited use of a seventh-
calibration. order FIR filter for signals sampled at a 1-minute interval.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 406 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Medtronic patents27,28 show raw signals being obtained alarm, whereas the Medtronic Guardian RT and
at 10-second intervals. At the end of each 1-minute Abbott Navigator systems have both a threshold and a
interval, the lowest and highest values are removed, and projected alarm.36
the remaining four are averaged to obtain the 1-minute
average. Similarly, every 5-minute interval removes Linear Regression and Linear-in-Time Projections
the lowest and highest 1-minute averages and averages
Perhaps the most intuitive (and most common) method of
the remaining three data points for the 5-minute average.
predicting glucose values is to perform linear regression
Removing the highest and lowest values has a similar
using a “window” of recent glucose measurements
effect to median filtering. “Clipping limits” can be applied
(filtered, raw, or estimates of glucose) and assuming
to limit the rate of change of either the raw signal
that the slope remains constant into the future. As an
or calibrated glucose values. Keenan and associates29
example, consider the simulated set of glucose sensor
noted that the Medtronic CGMS Gold and Guardian RT
measurements shown in Figure 1, where t = 0 is the current
have different filtering algorithms.
time. Standard linear regression analysis yields not
only an estimate of the slope and intercept parameters
An infinite impulse response (IIR) filter has the form but confidence intervals as well. These confidence intervals
can also be used in the future prediction, yielding a
ŷ = −a1 ŷk −1 −  − aN ŷk − N + b0 yk + b1 yk −1 +  + bM yk − M , (13)
 k region of possible glucose values, as shown 30 minutes
into the future in Figure 1.
where the current filtered value of the output is a function
of N previously filtered values, as well as current and M
Past and future glucose
previous measurements. A patent assigned to Dexcom16
suggests the use of IIR filters for raw signal filtering,
with an example of N = 3 and M = 3. It should be
noted that filters can also be applied to the derivative
of the glucose (or its change between two successive
measurements); this approach is cited in the Medtronic
patent of Steil and Rebrin30 and is particularly useful
G, mg/dl

as part of a closed-loop algorithm based on the rate of


change of glucose.

Optimal Estimation Theory


The optimal estimation theory approach of Knobbe
and Buckingham31 and Knobbe and associates,32 based
on use of a continuous-discrete extended Kalman filter,
explicitly accounts for both sensor noise and uncertainty
in reference glucose (finger stick) measurements. Based on
t, min
use of a discrete dual-rate Kalman filter, a similar
approach was used by Bequette and colleagues33 and Figure 1. Continuous glucose (G) measurements are plotted as (+)
Kuure-Kinsey colleagues.34 The next section provides a from t = –15 to t = 0 minute. Linear regression is used to fit data to
tutorial overview of Kalman filtering. the solid line, retrospectively, from t = –15 to 0 minute. Dashed lines
represent ±95% confidence intervals. Note that confidence intervals
grow for predictions from t = 0 to t = 30 minutes into the future.
Glucose Estimation and Prediction for
Hypoglycemic and/or Hyperglycemic
Alarms The equation used for linear regression is a first-order
“polynomial-in-time” model
One of the major motivations for the use of continuous
glucose monitoring is to detect or predict the onset yk = atk + b, (14)
of hypoglycemia. Heise and colleagues35 provided an
overview of requirements for a successful alarm system where the subscript k represents the kth sample time,
based on CGM. CGM alarms can be based on either a is the estimated slope, and b is the estimated intercept.
threshold (limit exceeded by the current glucose
measurement) or projected (a limit is expected to be Noujaim and colleagues37 performed simulation studies,
exceeded at some point in the future, usually 10–45 similar to that shown in Figure 1, for a glucose rate of
minutes) alarms. Currently, Dexcom sensors use a threshold change of –5 mg/dl/min. Based on metrics proposed in

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 407 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

their paper, they showed that achieving false negative of multiple window lengths of past data for multiple
and false positive ratios of <5 and <10%, respectively, linear regressions. In addition, they considered several
would require a CGM to have an mean absolute relative different prediction horizons. A similar approach is
deviation of ≤7.5%. Brauker38 suggested a “zone” of future proposed in the patent by Dunn and colleagues,45
glucose possibilities, which is the same idea as that shown who suggested a “mixture of experts” based on the
in Figure 1. superposition of multiple linear regressions.

The Abbott FreeStyle Navigator continuous glucose The previous methods require that filtered glucose
monitoring (FSN-CGM) system has both threshold and concentrations be used to develop the models for future
projected alarms. McGarrough and Bergenstal39 presented projections. The theory of optimal estimation and prediction,
in-clinic and in-home results for the FSN-CGM. however, combines signal filtering with model-based
For projected alarms, a window of 15 minutes of sensor estimation and is discussed in the following subsection.
data is used to estimate the rate of change of glucose
and its uncertainty. If the uncertainty is below a certain Optimal Estimation and Prediction Theory
value and the projected glucose is below a threshold of Palerm and colleagues46 developed a Kalman filter-based
85 mg/dl within 10, 20, or 30 minutes, for low, medium, approach to estimate the future values of blood glucose.
and high sensitivity alarms, respectively (as selected by They explored the effect of sample time, hypoglycemic
the patient), an alarm is activated. threshold, and prediction horizon on the sensitivity and
specificity of the predictions and discussed how the
Another linear projection method (used in the voting optimal estimators can be tuned to trade-off the false
method presented by Cameron and colleagues40 and alarm rate with the rate of missed hypoglycemic
Dassau and colleagues41 and the pump shutoff studies episodes; this suggests that an individual can tune the
of Buckingham and associates42) is to consider the end alarm depending on their personal risk for hypoglycemia.
points of a data window Palerm and Bequette47 validated this approach to data
yk − yk − N obtained from hypoglycemic clamp studies. Buckingham36
rate k = (15)
NΔt also recommended that the hypoglycemic alarm threshold
be tunable to meet an individual’s particular needs.
and find the mean squared error of the rate based on
single sample times over the same interval
The underlying model is

. (16) xk +1 = Φxk + Γ w wk
, (19)
yk = Cxk + vk
The standard deviation of the rate estimate is
where x is a vector of states and y is measured output,
MSErate k wk is process noise (covariance Q), and vk is measurement
σ ( rate k ) = . (17) noise (covariance R). If it is assumed that process noise
N −1
drives the first derivative of glucose with time, then the
Further, this can be scaled by the absolute value of the following relationships result
rate of change
g k + 1 = g k + dk
σ ( rate k )
unc k = (18) dk + 1 = dk + w k , (20)
rate k
yk = gk + vk
and if the scaled uncertainty is greater than some
threshold value, the prediction is not accepted. where g and d represent the glucose and the change in
glucose from step to step, respectively. The state space
Choleau and associates43 used a window of 10 minutes, model corresponding to Equation (20) is
with a sensor sample time of 0.5 minute, and linear
regression to estimate the slope (glucose rate of change)
and to project the glucose concentration 20 minutes ⎡ g ⎤ ⎡ 1 1 ⎤⎡ g ⎤ ⎡ 0 ⎤
⎢ ⎥ = ⎢ ⎥⎢ ⎥ + ⎢ ⎥w
into the future. If the projected glucose is 70 mg/dl or less, ⎢⎣ d ⎥⎦ k +1 0 1 ⎦ ⎢⎣ d ⎥⎦
⎣ ⎣ 1 ⎦ k
the alarm is triggered. Experimental data are presented     k 
xk +1 Φ xk Γw
based on rat studies.
⎡ g ⎤
Cameron and colleagues44 developed a similar approach
yk = ⎡⎣ 1 0 ⎤⎦ ⎢ ⎥ + vk . (21)
  ⎢⎣ d ⎥⎦
in their development of a statistical-based hypoglycemic C 
  k
alarm. Their technique, however, involves the consideration xk

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 408 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Process and measurement noise are considered stochastic Pk = ΦPk −1 ΦT + Γ wQΓ wT . (28)
processes, and the process noise covariance (Q) is known
only approximately and is often used as a tuning parameter. For this problem, the confidence interval grows with
The states are estimated using predictor–corrector equations each step not followed by a measurement update as
of the form: there are two “integrators” in the glucose model; this
behavior is demonstrated in the simulations that follow.
x̂k |k −1 = Φx̂k −1|k −1 predictor (time update) (22)

and the glucose sensor measurement is used to update Consider the simulated noise sequence presented in
the state estimate Figure 1 where Kalman filtering is used to obtain
glucose and rate of change of glucose, in real time,
(
x̂k |k = x̂k |k −1 + Lk yk − Cx̂k |k −1 ) despite substantial measurement noise. The state vector
estimate is initialized with the measured glucose at
corrector (measurement update) (23) t = –15 minutes, with an assumed rate of change of
0 mg/dl/min. Figure 2 displays real-time estimates of
where x̂ represents an estimate of the states and the
glucose (top) and its rate of change (bottom) along with
subscript k|k – 1 means the estimate at step k is based
the uncertainty bounds of each. Although the actual
on measurements up (and including) step k – 1. Note that
rate of change was –2 mg/dl/min, the Kalman filter
a model is used to propagate the state estimate from the
converges to this value within 15 minutes. Figure 3
previous time step (k – 1) to the current time step (k).
shows predicted glucose values based on measurements
The measurement at the current time step is then used
available until t = 0 minute. Because of the uncertainty
to update the state estimate based on Kalman gain (Lk).
about future rates of change, confidence intervals of the
glucose predictions increase each step into the future;
The state estimate covariance is determined by solving simulation details are provided in the Appendix.
The increase in uncertainty bounds in Figure 3
( )
−1
Pk = ΦPk −1 ΦT + Γ wQΓ wT − ΦPk −1CT CPk −1CT + R CPk −1 ΦT , (24) (based on Kalman filtering), compared to Figure 1
(based on linear regression analysis), is an artifact of
where the first two terms on the right-hand side of the
assumptions used in the simulation. The smaller linear
equals sign represent the propagation of state covariance
regression confidence bounds are due to the fact that the
and process noise, while the third term represents a
real underlying signal has a constant slope, while the
correction due to the measurement update (including the
Kalman filter “recognizes” that the slope may change in
effect of measurement noise)
the future.

( )
−1
Lk = Pk CT CPk CT + R . (25)

Essentially, the Kalman filter provides a trade-off between


the likelihood that a change in a sensor reading is due
G, mg/dl

to a real effect (such as capillary blood glucose changing)


and sensor noise. For more background on Kalman
filtering and optimal estimation, see Stengel.48

Future glucose predictions from the most recent t, min


measurement at time step k to step k + j are given by

x̂k + j|k = Φ j x̂k|k . (26)


Dg, mg/dl/min

For the two-state model in Equation (21), this is


equivalent to assuming that the rate of change of glucose
is constant in the future. That is, for the jth future time
step
t, min
ĝk + j|k = ĝk|k + jd̂k|k , (27)
Figure 2. Glucose (G; top) and rate of change of glucose (Dg; bottom).
Actual (black), Kalman filter (KF) estimate (blue), and uncertainty
where d̂k|k is the estimated change in glucose from step (unc) bounds (- - -). The Kalman filter was initialized at t = –15
k – 1 to step k (the current measurement). Uncertainty minutes, with uncertainty in the glucose and rate-of-change states.
in the future grows as [Equation (24) without the The estimated error variance improves with measurement (meas)
measurement feedback term] updates. Q = 0.01, R = 4.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 409 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Past and future glucose ⎡ 1 1 0 ⎤ ⎡ 0 ⎤


⎢ ⎥ w ⎢ ⎥
Φ = ⎢ 0 1 1 ⎥, Γ = ⎢ 0 ⎥,
⎢⎣ 0 0 1 ⎥⎦ ⎢⎣ 1 ⎥⎦
⎡ g ⎤
⎢ ⎥
C = ⎡⎣ 1 0 0 ⎤⎦ , x = ⎢ d ⎥ , y = G, (31)
⎢ f ⎥
G, mg/dl

⎣ ⎦

where g, d, and f represent glucose, rate of change of


glucose, and the second derivative of glucose with
respect to time, respectively. The advantage of the
three-state model is that it captures dynamics near the
maximum (peak) and minimum (valley) values of glucose.
While the three-state model yields better estimates for
previous and current glucose estimates, Palerm and
Bequette47 found that the assumption of a constant
t, min first derivative (two state) for future predictions led to
Figure 3. Actual glucose (G; black), measured (+), estimated (blue), and better performance for multistep-ahead predictions on
uncertainty bounds (- -). The Kalman filter was initialized at t = –15 clinical data than assuming a constant second derivative
minutes. After t = 0 the estimated error variance grows as there are (three state).
no measurements to improve the estimates.

Autoregressive (AR) Model Prediction


Facchinetti and colleagues49 presented a two-state Bremer and Gough50 applied AR models to blood glucose
Kalman filter that has identical behavior to our two-state data available at 10-minute sample times and compared
model shown in Equation (21). Their integrated random predictions for 10, 20, and 30 minutes ahead. An AR model
walk model is presented in the form has the form
gk +1 = 2gk − gk −1 + wk n

yk = gk + vk , (29) yk = ∑ ai yk − i + wk , (32)
i=1

which has the state space form where y is the glucose value, w is a white noise sequence,
and there are n coefficients, ai (i.e., the model is nth order).
⎡ x ⎤ ⎡ 2 −1 ⎤ ⎡ x1 ⎤ An autoregressive moving average model has a more
⎥ + ⎢ 1 ⎥ wk
⎡ ⎤
⎢ 1 ⎥ = ⎢ ⎥⎢
x
⎢⎣ 2 ⎥⎦ 1 0 x 0 general form with n ai coefficients and m ci coefficients
⎣ ⎦ ⎢ 2 ⎥⎦ k ⎣⎦
   ⎣
k+1   n m−1
xk +1
Φ
xk Γw
yk = ∑ ai yk − i + ∑ ci wk − i . (33)
⎡ x ⎤ i=1 i=0
1
yk = ⎡⎣ 1 0 ⎤⎦ ⎢ ⎥ + vk , (30)
  ⎢ x2 ⎥ Reifman and colleagues51 studied a sensor with a sample
C ⎣ ⎦k
  time of 1 minute and used 2000 data points (2000 minutes)
xk
 to “train” a 10th-order AR model (n = 10); that is, they fit
where the first state is the glucose and the second the 10 model parameters to data. The performance of this
state is the value of glucose at the previous time step. model is based on the ability to match 4000 additional
Although the performance of the resulting Kalman filter minutes of data. They found that a prediction horizon of
is equivalent to results shown in Figures 2 and 3, we 30 minutes yields a root mean square error of 22 mg/dl,
feel that our formulation is more natural, as our second with a prediction delay. In order to reduce the prediction
state is the rate of change of glucose, which is applied delay, Gani and colleagues52 used a smoothing procedure
directly to future predictions. Facchinetti and associates49 and regularization to minimize changes in the glucose
developed a nice procedure for tuning the Kalman filter first derivatives. This approach, with a 30th-order model,
based on data from individual subjects. reduces the prediction lag compared to the results of
Reifman and associates.51
The Kalman filter estimates shown in Figures 2 and 3
are based on a second-order (two-state) model. However, Sparacino and colleagues53 used an adaptive first-order
if it is assumed that process noise drives the second model, where the parameter is updated at each time
derivative of glucose with time, the following third-order step to estimate future glucose values and compared
(three-state) model can be used: this with a first-order “polynomial-in-time” approach.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 410 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Zanderigo and associates assessed the accuracy using prediction alarms, however. A number of different
a continuous glucose error-grid analysis. Sparacino and structures and training procedures can be used for
colleagues provided a tutorial overview of algorithms for artificial neural networks. Kuure-Kinsey and associates60
continuous glucose monitoring and glucose prediction presented a process application of a feed-forward ANN,
for use in hypo/hyperglycemic alarms. They noted that while Kuure-Kinsey and Bequette61 showed that a
a limitation to the approach of Reifman and colleagues51 recurrent ANN yields better future predictions. A major
is the substantial amount of training data required for disadvantage to nonlinear techniques, such as ANN,
estimation of a large number of parameters in a fixed- is that much training data are needed (for model
parameter formulation. Gani and colleagues addressed parameter estimation).
this criticism by showing that a model could be produced
once for a particular individual and then used on other Discussion
individuals.
Gani and colleagues52 stated that a disadvantage to
Kalman filtering is that it requires a high-fidelity, first-
Eren-Oruklu and associates57,58 developed a more general principles model for meals and physical activity, but it
approach, including real-time adaptation of parameters, should be clear from Equations (20), (21), and (31) that
and found that the best model is second order, with the this is not the case. The two- and three-state models
form of Equations (21) and (31) are nothing more than basic
principles of differential calculus applied to glucose; that
yk = a1 yk −1 + a2 yk −1 + wk + c1 wk −1 , (34)
is, the two-state model related “distance” (glucose) and
“velocity” (rate of change) of glucose, whereas the three-
while Sparacino and colleagues53 used a first-order model
state model relates distance, velocity and “acceleration”
yk = a1 yk −1 + wk . (35) (second derivative of glucose). These models are exact,
with the only uncertainties being the distribution of
In these studies, model coefficients are estimated recursively, process noise (perturbations to either the first or second
using weighted least squares, where data further in derivatives of glucose) and sensor noise. A major advantage
the past have less of an impact than more recent to the Kalman filtering approach is that it, unlike
data. That is, the parameters are found to solve the empirical modeling, does not require much data for
optimization problem parameter estimation. Depending on what is known,
N −1
or assumed, about the process and sensor noise variances,
2 a single tuning parameter, the Q/R ratio, can be used to
min ∑ m i ( yk − i − ŷk − i ) , (36)
change Kalman filter estimator performance.
i=0

where m is a “forgetting factor,” with values between


0 and 1. The forgetting factor57,58 is adapted based on a Blood and Interstitial Fluid Glucose
change detection method that reduces m during periods Dynamics and Sensor Lag
of rapid glucose change. Further, statistical process
monitoring techniques58 (control charts) are used to Many papers have stressed the importance of the lag
activate hypoglycemic alarms. between capillary blood and interstitial fluid glucose
levels. In practice the interstitial fluid glucose is not
Combined Methods measured directly; the subcutaneous sensor current is
assumed to be proportional to it. Weinstein and associates62
Recognizing that each of the hypoglycemic prediction
noted that the mean average relative deviation between
methods has strengths and weaknesses, a voting method40,41
venous glucose (based on a laboratory reference reading)
was used to determine when hypoglycemia is likely to occur.
and sensor glucose is minimized when data are time
The algorithms employed include Kalman filtering,47
shifted by 12.6 minutes. Voskanyan and colleagues63
hybrid adaptive IIR, linear polynomial in time, statistical
noted that sensor filtering algorithms can add a significant
hypoglycemia prediction,44 and a numerical logical
lag when high rates of glucose change are being studied,
algo-rithm. Two of these approaches (linear polynomial
and the physiological blood/interstitial fluid lag may
in time and statistical hypoglycemia prediction) have
have been overestimated in several articles based on the
been used in a clinical pump shutoff study.42
Medtronic CGMS.

Artificial Neural Networks (ANN) Keenan and colleagues29 provided an overview of delays
Artificial neural networks and other nonlinear models can in continuous glucose sensor devices. For common
be used for glucose prediction. Pappada and colleagues59 transcutaneous sensors on the market, the physiologic
used an ANN, based on CGM and additional patient diary lag is 3–12 minutes, the electrochemical sensor lag is
information (meals and insulin infusion), to predict 1–2 minutes, and there can be additional lags due to filtering
glucose values; they do not propose hypoglycemic algorithms. In an in vitro study of the Medtronic CGMS,

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 411 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Keenan and associates29 found that a substantial time Glucose concentration, blood vs. s.c. measured
delay can be induced by the sensor noise filtering
algorithm under conditions of glucose rate of change
that are not physiologic.

A number of investigators64,65 have approximated the


dynamics between capillary blood glucose and interstitial

G, mg/dl
fluid as a first-order differential equation with the form

dy 1 k
= ay + bg = − y + g, (37)
dt t t

where g and y represent perturbations of the capillary


blood glucose and sensor signal, respectively, from
steady-state (basal) conditions, and k and t represent
the gain and time constant. Schmidtke and colleagues64
indicated that t ranged from 9 to 25 minutes in rats,
whereas the dog studies of Rebrin and associates65 found t, min
that t ranged from 5 to 12 minutes. Steil and colleagues66
Figure 4. Simulated change in capillary blood glucose (G) and the
studied humans and found t = 3 minutes. Kulcu and corresponding interstitial fluid sensor signal. A lag of 12 minutes
colleagues67 found the physiological lag in humans to be between capillary blood and interstitial fluid is assumed, and sensor
approximately 5 minutes. noise with a standard deviation of 1 mg/dl is used. s.c., subcutaneous.

Consider now the simple simulation presented by compensation in their products; it is used here merely to
Rebrin and associates65 for a capillary blood glucose show the major advantages of optimal estimation-based
decrease from 200 to 100 mg/dl, where a time constant techniques for this type of problem. The Medtronic patent
(lag) of 12 minutes and a gain of 1 are assumed; the by Steil and Rebrin30 cites the use of a Weiner filter for
sensor sample time is 1 minute. The corresponding lag compensation, but no technical details are provided.
interstitial fluid glucose, with sensor noise (standard The Abbott patent by Feldman and McGarraugh17 describes
deviation = 1 mg/dl), is shown in Figure 4. While the a lag compensation procedure identical to Equation (39),
measurement noise in Figure 4 does not appear too when y is a calibrated sensor value (and thus a/b = –1).
significant, it does have a strong effect on the ability to
estimate blood glucose from subcutaneous measurements, Bequette68 developed a Kalman filter-based algorithm
as demonstrated in the simulations that follow. to compensate for the blood glucose to interstitial fluid
transport lag, even when there is substantial sensor noise.
Rebrin and colleagues65 presented an intuitive estimation A formulation that assumes that the stochastic noise
approach by rearranging Equation (37) to solve for blood term perturbs the glucose rate of change is shown in the
glucose (g) from the subcutaneous sensor signal (y): following equation
dy ⎡ s ⎤ ⎡ ⎤⎡ s ⎤ ⎡
⎥ ⎢ Φ Γ 0 ⎥⎢ k ⎥ ⎢ 0 ⎥

− ay ⎢ k +1
ĝ = dt , (38) ⎢ gk +1⎥ = ⎢ 0 1 1 ⎥ ⎢ gk ⎥ + ⎢ 0 ⎥ wk
b ⎢ ⎥ ⎢ 0 0 1 ⎥⎢ ⎥ ⎢ 1 ⎥
⎢⎣ dk +1
⎥⎦ ⎣ ⎦ ⎢⎣ dk ⎥⎦ ⎣ ⎦
where ^ is used to indicate an estimated value. A finite-
⎡ s ⎤
differences (FD) approximation for the derivative yields ⎢ ⎥
yk = ⎣ 1 0 0 ⎦ ⎢ gk ⎥ + vk
⎡ ⎤ , (40)
⎢ d ⎥
⎣ k ⎦
where s is the subcutaneous glucose concentration, g is
. (39) the capillary blood glucose, and d is the rate of change
of blood glucose. The time lag of 12 minutes and the
gain of 1 result in values of Φ = exp ( −Δt t ) = 0.92 and
Rebrin and colleagues65 noted that this numerical Γ = 1 − Φ = 0.08. The state estimates are obtained solving
derivative-based approach is very sensitive to measurement Equations (22) and (23) as before. For these simulation
noise and also applied a three-point moving average studies, the steady-state Kalman gain is obtained by
filter to the derivative term. It should be made clear iterating Equations (24) and (25) until they converge to
that Medtronic does not use this FD approach for lag constant values.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 412 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

A comparison of FD with Kalman filter estimates is blood glucose and the subcutaneous sensor signal, which
shown in Figure 5, where the Kalman filter is designed may actually be time varying. Another limitation is the
based on Q = 0.005 and R = 1 and on the steady-state static calibration curve relating the subcutaneous signal to
Kalman gain (Lss). Clearly the Kalman filter estimates the capillary blood glucose; this is strongly dependent
are insensitive to sensor noise, with the downside of on the quality of the calibration, which is dependent on the
a slight lag in the estimates when glucose begins to glucose meter variability as well as the “human element.”
decrease. This lag can be reduced by using a larger
Q value in the design, with a slight increase in noise
sensitivity.
Signal Dropouts and Related Artifacts
A simple way to detect signal dropouts is to set a bound
on allowable measurement changes. That is, a measurement
is invalid if

yk − yk −1 > d
G, mg/dl

, (42)
yk < ε

where d is a rate-of-change threshold. Because the rate


of change is sensitive to noise, consider the use of a
t, min Kalman filter, with glucose rate of change as the second
state
⎡ ĝ ⎤
x̂k|k = ⎢ ⎥ . (43)
G, mg/dl

⎢⎣ d̂ ⎥⎦
k|k

If d̂k|k > d, then a revised glucose estimate could be


ĝk|k = ĝk −1|k −1 ± d. This prediction could be carried out for
t, min j time steps of an invalid signal using
Figure 5. Comparison of estimated blood glucose (G) from a Kalman
filter (KF; top), with the FD estimator (bottom), based on the simulated x̂k + j|k = Φ j x̂k|k . (44)
sensor signal in Figure 4. While there is a slight lag immediately after
the initial decrease in blood glucose using the Kalman filter, much An alarm could be activated after a certain number
less noise propagates into the estimate compared to the FD approach.
of steps without a valid signal or when “open-loop”
covariances indicate that an individual is possibly
Another approach that can be used to estimate capillary entering an unsafe condition.
blood glucose from noisy subcutaneous sensor signals
is Phillips–Tikhonov regularization, as shown by Freeland Bondia and colleagues70 discussed the use of support
and Bonnecaze.69 Essentially their method involves an vector machines to detect incorrect measurements; their
analytical integration of Equation (37) to the form of method is based on retrospective analysis, but note that
a real-time approach is desirable. Monitoring techniques
t for fault detection and abnormal situation management
g (γ )
( )
y ( t ) = y (θ ) exp − ( t − θ ) t + ∫ ( )
exp ( t − γ ) /t dγ , (41) are often used in the chemical process industries, and it
θ
t is likely that these techniques could be used successfully
for CGM fault detection. For example, Juricek and
where θ is the initial time for a window of data that associates71 presented a Kalman filter-based approach
includes the current time, t. Discretization and inversion to predict whether a process variable will violate an
methods are then used to solve for the unknown glucose emergency limit in the future.
as a function of time, g(t). This method appears to be more
sensitive to measurement noise than Kalman filtering,
It is also standard in the chemical process industries
however.
to use redundant measurements to reconcile errors and
detect gross errors and failures. Ward and colleagues72
Discussion proposed a similar idea, but developed a sensor array
There are a number of limitations to the performance with four implantable sensors. They used a median-
of a blood glucose estimator, no matter which approach is based algorithm to detect when one of the sensor signals
used. One is the dynamic relationship between capillary is inconsistent with the other sensors.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 413 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Conclusions 13. Lodwig V, Heinemann L. Continuous glucose monitoring with


glucose sensors: calibration and assessment criteria. Diabetes
Technol Ther. 2003;5(4):573-87.
A concise review of many of the published algorithms
proposed for CGM calibration, filtering, hypo- and 14. Hayter PG, Sharma M, Dunka L, Stout P, Price DA, Horwitz DL,
Marhoul J, Vaez-Zadeh S. Performance standards for continuous
hyperglycemia prediction, and fault detection has been
glucose monitors. Diabetes Technol Ther. 2005;7(5):721-6.
conducted. A tutorial exposition on the use of Kalman
filtering for improved glucose (and rate of change) 15. Shiavi R. Introduction to applied statistical signal analysis. 3rd ed.
Academic Press; 2007.
estimation and prediction is provided. Significant progress
needs to be made in sensor fault detection, as well 16. Goode PV Jr, Brauker JH, Kamath AU. System and methods for
processing analyte sensor data. United States patent US 6,931,327
as integration of all of the components into a robust, B2. 2005 Aug 16.
reliable hardware and software platform.
17. Feldman BJ, McGarraugh GV. Method of calibrating an analyte-
measurement device, and associated methods, devices and systems.
United States patent US 7,299,082 B2. 2007 Nov 20.
18. Ginsberg BH. Factors affecting blood glucose monitoring: sources
of errors in measurement. J Diabetes Sci Technol. 2009;3(4):903-13.
19. Panteleon A, Rebrin K, Steil GM. The role of the independent
variable to glucose sensor calibration. Diabetes Technol Ther.
Funding:
2003;5(3):401-10.
This research was partially supported by grants from the Juvenile
20. Choleau C, Klein JC, Reach G, Aussedat B, Demaria-Pesce V,
Diabetes Research Foundation Artificial Pancreas Project (22-2007-8101
Wilson GS, Gifford R, Ward WK. Calibration of a subcutaneous
and 22-2009-795).
amperometric glucose sensor. Part 1. Effect of measurement
uncertainties on the determination of sensor sensitivity and
References: background current. Biosens Bioelectron. 2002;17(8):641-6.

1. Bequette BW. A critical assessment of algorithms and challenges in 21. Choleau C, Klein JC, Reach G, Aussedat B, Demaria-Pesce V,
the development of an artificial pancreas. Diabetes Technol Ther. Wilson GS, Gifford R, Ward WK. Calibration of a subcutaneous
2005;7(1):28-47. amperometric glucose sensor implanted for 7 days in diabetic
patients. Part 2. Superiority of the one-point calibration method.
2. Doyle FJ 3rd, Jovanovic L, Seborg DE. A tutorial on biomedical Biosens Bioelectron. 2002;17(8):647-54.
process control: glucose control strategies for treating type 1
diabetes mellitus. J Process Control. 2007;17(7):572-6. 22. Clark WL, Cox D, Gonder-Frederick LA, Carter W, Pohl SL.
Evaluating clinical accuracy of systems for self-monitoring of
3. Kumareswaran K, Evans ML, Hovorka R. Artificial pancreas: an blood glucose. Diabetes Care. 1987;10(5):622-8.
emerging approach to treat type 1 diabetes. Expert Rev Med Dev.
2009;6(4):401-10. 23. Aussedat B, Thome´-Duret V, Reach G, Lemmonier F, Klein JC,
Hu Y, Wilson GS. A user-friendly method for calibrating a
4. Cobelli C, Dalla Man C, Sparacino G, Magni L, De Nicolao G, subcutaneous glucose sensor-based hypoglycaemic alarm. Biosens
Kovatchev B. Diabetes: models, signals and control. IEEE Rev Bioelectron. 1997;12(11):1061-71.
Biomed Eng. 2010;3. In press.
24. King C, Anderson SM, Breton M, Clarke WJ, Kovatchev B.
5. Klonoff DC. Continuous glucose monitoring: roadmap for 21st Modeling of calibration effectiveness and blood-to-interstitial
century diabetes therapy. Diabetes Care. 2005;28(5):1231-9. glucose dynamics as potential confounders of the accuracy of
6. Klonoff DC. A review of continuous glucose monitoring technology. continuous glucose sensors during hyperinsulinemic clamp.
Diabetes Technol Ther. 2005;7(5):770-775 J Diabetes Sci Technol. 2007;1(3):317-22.

7. JDRF CGM Study Group. JDRF randomized clinical trial to assess 25. DirectNet Study Group. Evaluation of factors affecting CGMS
the efficacy of real-time continuous glucose monitoring in the calibration. Diabetes Technol Ther. 2006;8(1):318-25.
management of type 1 diabetes: research design and methods. 26. Poitout V, Moatti-Sirat D, Reach G, Zhang Y, Wilson GS,
Diabetes Technol Ther. 2008;10(4): 310-21. Lemonnier F, Klein JC. A glucose monitoring system for on
8. Skyler JS. Continuous glucose monitoring: an overview of its line estimation in man of blood glucose concentration using a
development. Diabetes Technol Ther. 2009;11 Suppl 1:S5-10. miniaturized glucose sensor implanted in the subcutaneous tissue
and a wearable control unit. Diabetologia. 1993;36(7):658-63.
9. Kerr D, Fayers K. Continuous real-time glucose monitoring systems:
time for a closer look. Pract Diab Int. 2008;25(1):37-41. 27. Mastrototaro JJ, Gross TM, Shin JJ. Glucose monitor calibration
methods. United States patent US 6,424,847. 2002 Jul 23.
10. Oliver NS, Toumazou C, Cass AE, Johnston DG. Glucose sensors:
a review of current and emerging technology. Diab Med. 28. Shin JJ, Holtzclaw KR, Dangui ND, Kanderian S Jr,
2009;26(3):197-210. Mastrototaro JJ, Hong PI. Real time self-adjusting calibration
algorithm. United States patent US 6,895,263 B2. 2005 May 17.
11. Cox M. An overview of continuous glucose monitoring systems.
J Pediatr Health Care. 2009;23(5):344-7. 29. Keenan DB, Mastrototaro JJ, Voskanyan G, Steil GM. Delays
in minimally invasive continuous glucose monitoring devices:
12. Klonoff D, Bernhardt P, Ginsberg BH, Joseph J, Mastrototaro J,
a review of current technology. J Diabetes Sci Technol.
Parker DR, Vesper H, Vigersky R. Performance metrics for
2009;3(5):1207-14
continuous interstitial glucose monitoring; approved guideline.
CLSI document POCT05-A (ISBN 1-56238-685-9). Clinical and 30. Steil G, Rebrin K. Closed-loop system for controlling insulin
Laboratory Standards Institute; 2008. infusion. United States patent US 7,354,420 B2. 2008 Apr 8.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 414 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

31. Knobbe EJ, Buckingham B. The extended Kalman filter for 51. Reifman J, Rajaraman S, Gribok A, Ward WK. Predictive
continuous glucose monitoring. Diabetes Technol Ther. 2005;7(1):15-27. monitoring for improved management of glucose levels. J Diabetes
Sci Technol. 2007;1(4):478-86.
32. Knobbe EJ, Lim WL, Buckingham BA. Method and apparatus for
real-time estimation of physiological parameters. United States 52. Gani A, Gribok AV, Rajaraman S, Ward WK, Reifman J. Predicting
patent US 6,575,905 B2. 2003 Jun 10. subcutaneous glucose concentration in humans: data-driven glucose
modeling. IEEE Trans Biomed Eng. 2009;56(2):246-54.
33. Bequette BW, Palerm CC, Willis JP, Desemone J. Incorporation of
glucose meter uncertainty in the calibration of continuous glucose 53. Sparacino G, Zanderigo F, Corazza S, Maran A, Facchinetti A,
sensors. Diabetes Technol Ther. 2005;7(2):366-7. Cobelli C. Glucose concentration can be predicted ahead in time from
continuous glucose monitoring sensor time series. IEEE Trans
34. Kuure-Kinsey M, Palerm CC, Bequette BW. A dual-rate Kalman filter
Biomed Eng. 2007;54(5):931-7.
for continuous glucose monitoring. Proc. IEEE EMB Conference;
2006. p. 63-6. 54. Zanderigo F, Sparacino G, Kovatchev BP, Cobelli C. Glucose
prediction algorithms from continuous monitoring data: assessment
35. Heise T, Koschinsky T, Heinemann, L, Lodwig V. Hypoglycemia
of accuracy via continuous glucose-error grid analysis. J Diabetes
warning signal and glucose sensors: requirements and concepts.
Sci Technol. 2007;1(5):645-51.
Diabetes Technol Ther. 2003;5:563-71.
55. Sparacino G, Facchinetti A, Maran A, Cobelli. Continuous glucose
36. Buckingham B. Clinical overview of continuous glucose monitoring.
monitoring time series and hypo/hyperglycemia prevention:
J Diabetes Sci Technol. 2008;2(2):300-6.
requirements, methods, open problems. Curr Diabetes Rev.
37. Noujaim SE, Horwitz D, Sharma M, Marhoul J. Accuracy 2008;4(3):181-92.
requirements for a hypoglycemia detector: an analytical model
56. Gani A, Gribok AV, Lu Y, Ward WK, Vigersky RA, Reifman J.
to evaluate the effects of bias, precision, and the rate of glucose
Universal glucose models for predicting subcutaneous glucose
change. J Diabetes Sci Technol. 2007;1(5):652-68.
concentration in humans. IEEE Trans Inf Tech Biomed. 2010;14(1):157-65.
38. Brauker J. Continuous glucose sensing: future technology
57. Eren-Oruklu M, Cinar A, Quinn L, Smith D. Estimation of future
developments. Diabetes Technol Ther. 2009;11 Suppl 1:S25-36.
glucose concentrations with subject-specific recursive linear
39. McGarraugh G, Bergenstal R. Detection of hypoglycemia with models. Diabetes Technol Ther. 2009;11(4):243-53.
continuous interstitial and traditional blood glucose monitoring
58. Eren-Oruklu M, Cinar A, Quinn L. Hypoglycemia prediction
using the Freestyle Navigator continuous glucose monitoring
with subject-specific recursive time-series models. J Diabetes Sci
system. Diabetes Technol Ther. 2009;11(3):145-50.
Technol. 2010;4(1):25-33.
40. Cameron FM, Niemeyer G, Palerm CC, Dassau E, Doyle FJ 3rd,
59. Pappada SM, Camero BD, Rosman PM. Development of a neural
Lee H, Bequette BW, Chase HP, Buckingham BA. Early detection of
network for prediction of glucose concentration in type 1 diabetes
hypoglycemia combining multiple predictive methods on retrospective
patients. J Diabetes Sci Technol. 2008;2(5):792-801.
clinical continuous glucose monitoring data. J Diabetes Sci Technol.
2008;2(2):A19. 60. Kuure-Kinsey M, Cutright R, Bequette BW. Computationally
efficient neural predictive control based on a feedforward
41. Dassau E, Cameron FM, Lee H, Bequette BW, Doyle FJ 3rd,
architecture. Ind Eng Chem Res. 2006;45(25):8575-82.
Niemeyer G, Chase P, Buckingham BA. Real-time hypoglycemia
prediction using continuous glucose monitoring (CGM), a safety 61. Kuure-Kinsey M, Bequette BW. Improved nonlinear predictive
net to the artificial pancreas. Diabetes. 2008;57:A13, Suppl. control performance using recurrent neural networks. Proceedings
of the 2008 American Control Conference; Seattle, Washington.
42. Buckingham B, Cobry E, Clinton P, Gage V, Caswell K,
p. 4197-202.
Kunselman E, Cameron F, Chase HP. Preventing hypoglycemia
using predictive alarm algorithms and insulin pump suspension. 62. Weinstein RL, Schwartz S, Brazg RL, Bugler JR, Peyser TA,
Diabetes Technol Ther. 2009;11(2):93-7. McGarraugh GV. Accuracy of the 5-day FreeStyle Navigator
continuous glucose monitoring system. Diabetes Care.
43. Choleau C, Dokladal P, Klein JC, Ward WK, Wilson GS, Reach G.
2007;30(3):1125-30.
Prevention of hypoglycemia using risk assessment with a continuous
glucose monitoring system. Diabetes Care. 2002;51(11):3263-73. 63. Voskanyan G, Keenan DB, Mastrototaro JJ, Steil GM. Putative
delays in interstitial fluid (ISF) glucose kinetics can be attributed
44. Cameron F, Niemayer G, Gundy-Burlet K, Buckingham B. Statistical
to the glucose sensing systems used to measure them rather
hypoglycemia prediction. J Diabetes Sci Technol. 2008;2(4):612-21.
than the delay in ISF glucose itself. J Diabetes Sci Technol.
45. Dunn TC, Jayalakshmi Y, Kurnik RT, Lesho MJ, Oliver JJ, 2007;1(5):639-44.
Potts RO, Tamada JA, Waterhouse SR, Wei CW. Method and device
64. Schmidtke DW, Freeland AC, Heller A, Bonnecaze R. Measurement
for predicting physiological values. United States patent US 6,653,091
and modeling of the transient difference between blood and
B1. 2003 Nov 25.
subcutaneous glucose concentrations in the rat after injection of
46. Palerm CC, Willis JP, Desemone J, Bequette BW. Hypoglycemia insulin. Proc Natl Acad Sci U S A. 1998;95(1):294-9.
prediction and detection using optimal estimation. Diabetes
Technol Ther. 2005;7(1):3-14. 65. Rebrin K, Steil GM, Van Antwerp WP, Mastrototaro JJ.
Subcutaneous glucose predicts plasma glucose independent of
47. Palerm CC, Bequette BW. Hypoglycemia detection and prediction insulin: implications for continuous monitoring. Am J Physiol.
using continuous glucose monitoring--a study on hypoglycemic 1999;277(3 Pt 1):E561-71.
clamp data. J Diabetes Sci Technol. 2007;1(5):624-9.
66. Steil GM, Rebrin K, Mastrototaro J, Bernaba B, Saad MF.
48. Stengel RF. Optimal control and estimation. New York: Dover; 1994. Determination of plasma glucose during rapid glucose excursions
49. Facchinetti A, Sparacino G, Cobelli C. An on-line self-tuneable with a subcutaneous glucose sensor. Diabetes Technol Ther.
method to denoise CGM sensor data. IEEE Trans Biomed Eng. 2003;5(1):27-31.
2010;57. In press. 67. Kulcu E, Tamada JA, Reach G, Potts RO, Lesho MJ. Physiological
50. Bremer T, Gough DA. Is blood glucose predictable from previous differences between interstitial glucose and blood glucose
values? A solicitation for data. Diabetes. 1999;48(3):445-51. measured in human subjects. Diabetes Care. 2003;26(8):2405-9.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 415 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

68. Bequette BW. Optimal estimation applications to continuous


glucose monitoring. Proceedings of the 2004 American Control
Conference; 2004. p. 958-62.
69. Freeland AC, Bonnecaze RT. Inference of blood glucose concentrations
from subcutaneous glucose concentrations: applications to glucose
biosensors. Ann Biomed Eng. 1999;27(4):525-37.
70. Bondia J, Tarin C, Garcia-Gabin W, Esteve E, Fernandez-Real
JM, Ricart W, Vehi J. Using support vector machines to detect
therapeutically incorrect measurements by the MiniMed CGMS.
J Diabetes Sci Technol. 2008;2(4):622-9.
71. Juricek BC, Seborg DE, Larimore WE. Predictive monitoring for
abnormal situation management. J Process Control. 2001;11:111-28.
72. Ward WK, Casey HM, Quinn MJ, Federiuk IF, Wood MD. A fully
implantable subcutaneous glucose sensor array: enhanced accuracy
from multiple sensing units and a median-based algorithm.
Diabetes Technol Ther. 2003;5(6):943-52.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 416 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

Appendix: Simulation Parameters

A1. Linear Decrease in Glucose Example


The simulation shown in Figure 1 is based on a glucose rate of change (slope) of –2 mg/dl/min, starting at 150 mg/dl,
with random sensor noise with a standard deviation of 2 mg/dl.

A2. Kalman Filter Applied to Linear Decrease in Glucose Example


Simulation details for Figures 2 and 3 are provided next. The state and measurement variances are

Q = 0.12 mg2/dl2/min2
R = 22 mg2/dl2 .

The following initial conditions are used for the state vector and the state covariance
⎡ 22 0 ⎤
P0 = ⎢ ⎥
⎢⎣ 0 2 2 ⎥⎦

Thus there is significant initial uncertainty in the states, as the actual initial condition is
⎡ g ⎤ ⎡
⎥ = ⎢ 150 ⎥ .
0 ⎤
x0 = ⎢
⎢⎣ do ⎥⎦ ⎣ −2 ⎦

The Kalman gain (L) at the end of 15 minutes of measurements is


⎡ 0.5371 ⎤
Lk =15 = ⎢ ⎥,
⎣ 0.0436 ⎦

which eventually converges to the steady-state Kalman gain of

⎡ 0.2716 ⎤
Lss = ⎢ ⎥.
⎣ 0.0427 ⎦

The state covariance matrix of

⎡ 4.6415 0.3770 ⎤
Pk =15 = ⎢ ⎥
⎣ 0.3770 0.1025 ⎦

eventually converges to a steady-state value of

⎡ 1.4914 0.2343 ⎤
Pss = ⎢ ⎥.
⎣ 0.2343 0.0736 ⎦

That is, eventually (with continued measurement updates), variances of the glucose and rate-of-changes estimates
are 1.49 and 0.0736 mg2/dl2/min2, respectively, yielding long-term confidence intervals of ±1.22 mg/dl and ±0.27 mg/dl/min
for glucose and its rate of change.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 417 www.journalofdst.org


Continuous Glucose Monitoring: Real-Time Algorithms for Calibration, Filtering, and Alarms Bequette

A3. Estimation of Capillary Blood Glucose from Noisy Subcutaneous Sensor Example
Simulation details for Figures 4 and 5 are presented here. The process covariance, Q = 0.005, and the sensor noise,
R = 1 (consistent with the measurement noise variance of 1 mg2/dl2). The steady-state Kalman gain is
⎡ 0.2522 ⎤
Lss = ⎢ 0.7221 ⎥
⎢ ⎥
⎢⎣ 0.0611 ⎥⎦

and the steady-state state covariance matrix is


⎡ 0.3373 0.9656 0.0818 ⎤
Pss = ⎢ 0.9656 3.4424 0.3781 ⎥ .
⎢ ⎥
⎢⎣ 0.0818 0.3781 0.064 ⎥⎦

That is, the steady-state variance of the estimate of subcutaneous glucose (measured) is 0.3373 mg2/dl2, capillary blood
glucose (unmeasured) is 3.4424 mg2/dl2, and the rate of change of blood glucose (unmeasured) is 0.064 mg2/dl2/min2.

J Diabetes Sci Technol Vol 4, Issue 2, March 2010 418 www.journalofdst.org

You might also like