Insulin Estimation and Prediction
Insulin Estimation and Prediction
com
Insulin Estimation
and Prediction
a Review of the Estimation and Prediction of Subcutaneous
Insulin Pharmacokinetics in Closed-Loop Glucose Control
P
atients affected by type 1 diabetes (T1D) suffer uous glucose monitoring (CGM) technology, a significant
from lack of insulin secretion by the pancreas, amount of research has been focused in the last decade
due to the autoimmune destruction of the insulin- on the development of an artificial pancreas (AP), that is,
producing beta cells. This translates into elevated a closed-loop glucose control system that automatically
plasma glucose concentration with deleterious dispenses insulin. The AP is now closer to reality [1]. An
effects in the cardiovascular system, leading to serious AP system was first approved by the U.S. Food and Drug
long-term complications. With the improvement of contin- Administration (FDA) in 2016 [2]. The system still requires
user intervention at mealtime, as currently done in open-
Digital Object Identifier 10.1109/MCS.2017.2766312 loop insulin pump therapy, to administer an insulin bolus
Date of publication: 19 January 2018 based on carbohydrate counting (a hybrid closed-loop system).
Figure 1 The artificial pancreas as a classic, closed-loop, glucose control system (medical vocabulary in bold and control engineering
vocabulary in italics).
T o keep glucose levels of patients affected by T1D in a namic parameters. The coefficient of variance (CV) of the
safe range, the AP can be used as a closed-loop control area-under-the-curve of plasma insulin after an insulin
system that automatically dispenses insulin. However, the injection in lypohypertrophic adipose tissue ranged from
use of insulin as control action has different limitations: 55 to 65% (compared to 11–20% for normal adipose tissue),
• Insulin has a unidirectional effect lowering glucose values. corresponding to a three- to five-fold increment. No effect
Any insulin excess cannot be compensated beyond pump of lypohypertrophia on the time-to-peak plasma insulin
switch off, and external actions are required, such as meal was found. Intrasubject variability of the insulin effect
consumption or glucagon administration. (measured as the area-under-the-curve of the exogenous
• Insulin is delivered subcutaneously, as opposed to the glucose infusion needed to keep plasma glucose constant
pancreas, which delivers insulin into blood. The lag in- after insulin injection) was generally higher, especially
troduced by subcutaneous insulin absorption amounts during the first hour when the CV reached 90% (compared
to 50 min. The control action peak is reached after to 66% for normal adipose tissue).
another 30 min, with a total dynamic lag of 80 min. An Although the above study was conducted with insulin
excessive insulin infusion might later provoke hypoglyce- injections and not an insulin pump, it highlights the challenge
mia. Severe hypoglycemia can lead to coma and death. that intrasubject variability poses for any insulin therapy with
Therefore, mechanisms are necessary to avoid an excess of subcutaneous administration, including an AP. Current insu-
insulin within the patient’s body. They rely upon the prediction lin infusion sets in pumps need to be replaced every two to
of plasma insulin or IOB (the injected insulin that didn’t have three days to avoid inflammation and infection. Differences
an effect yet) from subcutaneous insulin pharmacokinetic in insulin absorption of consecutive infusion sites due to the
models. Control action is then modulated accordingly. How- development of lypohypertrophia can jeopardize the AP per-
ever, high variability of insulin pharmacokinetics suggests formance, increasing the risk of hypoglycemia. Besides, cur-
that real-time estimation of pharmacokinetic parameters and rent systems need two skin punctures, one for the sensor and
signals are also needed for better and safer performance. one for the insulin pump, making the rotation of the infusion
This can be addressed with the design of insulin observers. site more difficult [19]. (See “Why Is Insulin Estimation and
Prediction Needed in an Artificial Pancreas?” for a summary
of the key facts described in this section that justify the use of
insulin estimators and predictors.
Meal
Glucose-insulin Models
Carbohydrate Models describing the glucose regulation by insulin (hence-
Digestion and forth referred to as glucose-insulin models) are needed for
Absorption
the design of controllers and observers. The reader is
Concentration
Table 1 Low and intermediate complexity models widely used in the artificial pancreas field.
Insulin action Xo (t) =-p 2 X (t) + p 3 (I (t) - I b) Xo 1 (t) =-k a1 X 1 (t) + k b1 I (t) IoE (t) =-p 2 I E (t) + p 2 S I I (t)
Xo 2 (t) =-k a2 X 2 (t) + k b2 I (t)
Xo 3 (t) =-k a3 X 3 (t) + k b3 I (t)
Glucose metabolism Go (t) =-( p 1 + X (t)) G (t) Qo 1 (t) =-X 1 Q 1 (t) + k 12 Q 2 (t) - F 01 c
(t) Go (t) =- (GEZI + I E (t)) G (t)
U G (t) - FR (t) + U G (t) + EGP0 (1 - X 3 (t)) + EGP + R A (t)
+ p1 Gb +
VG Qo 2 (t) = X 1 Q 1 (t) - k 12 Q 2 (t) - X 2 (t) Q 2 (t)
Q 1 (t)
G (t) =
VG
lates the optimal sequence of the process and the measure- 200
ment noises to minimize a cost function within a fixed history 100
horizon. It is shown to have a better performance than the 0
0 50 100 150 200 250 300
Luenberger observer in simulation, rejecting a meal distur-
t (min)
bance quicker without inducing hypoglycemia.
Despite the risk to the patient’s safety from plasma insu- Figure 4 An example of performance of the insulin observer in
lin or IOB estimation errors due to large intrasubject vari- [35] for a sample patient. The dashed red line represents the case
ability, the literature addressing the design of insulin with nominal pharmacokinetic parameters in the Hovorka model;
observers and, most importantly, assessing its performance the solid blue line represents the case with real-time adaptation of
with clinical data, is scarce. k e and t maxI, with initial values set to nominal values; and the solid
green line represents the case with real-time adaptation of k e and
The Hovorka glucose-insulin model [23] and the extended t maxI, with initial values set to the average of the parameter values
Kalman filter (EKF) are used in [35], where real-time estimation estimated for the rest of the patients. Green diamonds represent
of plasma insulin concentration from CGM measurements measurements (adapted from [35]).
considered as a comparator, since it is still a common practice compared in Figure 4: 1) a population model is used as an
despite the expected variability in insulin pharmacokinetics insulin predictor considering nominal pharmacokinetic
(see the section “The Subcutaneous Insulin Route”). With parameters in the Hovorka model, which are clearly detuned
regard to variability, different scenarios are devised: natural for this patient (comparator); 2) pharmacokinetic parameters
physiological variability in insulin pharmacokinetics at a k e and t maxI are included in the Kalman filter for real-time esti-
given infusion site along the lifetime of the infusion set and mation, with initial conditions set to nominal parameters in
more abrupt changes in insulin pharmacokinetics due to the the Hovorka model, far from the actual values (representing a
use of a new infusion site after rotation, with different sub- new infusion site); and 3) the same case as 2), but the initial
cutaneous tissue properties (for instance, affected by lypo- conditions of the pharmacokinetic parameters are set to the
hypertrophia [18]). Due to the limited duration of the data average of the parameter values estimated for the rest of
(5 h), the above scenarios are characterized in [35] through the patients (following a cross-validation procedure), which
the observer initialization, since a change in infusion site is are closer to the actual values, as demonstrated by data.
expected to imply a larger mismatch between the observer From a practical perspective, only individual parameters
model and the actual behavior. Thus, three cases are are available for the initialization of pharmacokinetic
parameters. Figure 4 shows how real-time estimation of improves estimation accuracy, with a reduction of RMSE of
pharmacokinetic parameters leads to the detection of sig- 73%, with respect to a population model approach.
nificant deviations in plasma insulin prediction with the pop- In the simulation study presented in [37], the unscented
ulation model, reaching more accurate estimations after a Kalman filter (UKF) is used to calculate the bolus insulin size
transient time (the solid blue line). The impact of this transient based on a state estimate (which includes plasma insulin) and
time on closed-loop performance needs to be investigated. Once the meal size announced by the patient. The rationale is that
adapted, insulin estimation is expected to remain accurate aside from the meal size announcement, information pro-
enough (the solid green line). The root mean square error vided by the early postprandial period can help to reduce the
(RMSE) and mean absolute relative deviation (MARD) are impact of errors in carbohydrate counting by the patient,
computed for the assessment of the observer performance in allowing for the computation of more accurate insulin bolus
the cohort of patients. The obtained RMSE values are 24.5 ± doses even at the expense of a delayed administration. The
16.5 mU/L for case 1), 14.9 ± 7.7 mU/L for case 2), and 6.6 ± IVP glucose-insulin model [28] described in the section “Glu-
3.9 mU/L for case 3). Consideration of the pharmacokinetic cose-Insulin Models” and Table 1 is used in this work. Insulin
parameters k e and t maxI as extended states significantly sensitivity and the meal compartment are also estimated via a
O bservability measures how well internal states of a system The Gramian observability matrix can be computed from
can be deduced by knowledge of its external outputs. A experimental or simulation data within a region where the
dynamical system is called observable on a finite time interval process is to be operated (see [43], [S12], and [S13] for de-
[t 0, t f ] if any initial state x (t 0) = x 0 is uniquely determined by the tails). In these cases, it is called the empirical observability
corresponding output y(t) for t ! [t 0, t f ]. Gramian. For nonlinear systems, each state is normalized
All physiological glucose-insulin models belong to the such that its energy transfer to the output is equal to one. Its
category of nonlinear models. The observability of a non- singular values must then be determined. The smallest sin-
linear system gular value m quantifies the energy transfer from the least
observable state to the outputs. A system is considered un-
xo (t) = f (x (t), u (t)), (S5)
observable if m = 0, and practically observable if m 2 0.1.
y (t) = h (x (t)), (S6)
Moreover, m 1 0.1 for the normalized system indicates that
can be analyzed by means of analytical methods, through the the signal-to-noise ratio might be too small for a reliable
Lie derivatives [S11], or by numerical methods, through the em- state estimation.
pirical observability Gramian [S12]. Both of these models have It is worth noting that even when the system is observ-
been used in T1D research. In particular, Lie derivatives are able, difficulties in the reliable estimation of pharmacokinetic
used in [35] (Hovorka model) and [42] (Bergman model) and parameters may arise due to nonidentifiability issues. The a
the empirical observability Gramian in [43] (Bergman model). priori or structural identifiability property of a model indicates
if the parameters of the model can be determined, assuming
Lie Derivatives that all observable variables are error free. The lack of struc-
The Lie derivative of h (x) with respect to f (x, u) is defined as tural identifiability arises due to the model structure only and
L f (x, u) h (x) =4 h (x) f (x, u) and is calculated recursively as follows: is independent of the amount and quality of the given experi-
mental data. However, a parameter that is structurally iden-
L if (x, u) h (x) = L f (x, u) ` L f (x, u) h (x) j,
(i -1)
if i = 1, 2, ...
0
tifiable may still be practically nonidentifiable. This can arise
L f (x, u) h (x) = h (x) .
due to insufficient amounts and quality of experimental data
The system (S5)–(S6) is considered observable if the following or the chosen measurement time points. Common problems
Jacobian matrix in the identification of glucose-insulin models are the lack of
R V excitability of basal insulin, which is rarely variable enough,
S h (x) W
2 SL f (x, u) h (x)WW
S
(S7)
especially during the night, and the administration of insulin
2x S g W boluses at mealtime, making it difficult to separate the meal
SL nf (x-,1u) h (x)W
T X and insulin effects on glucose after meal intake.
state extension. Different bolus administration strategies are is exactly known. Due to the problem posed in this work,
investigated (at mealtime, 15 min after, and 30 min after the administration before the meal is not considered. However,
beginning of the meal) for ten patients for three-day simula- clinical trials that assessed the best timing for meal bolus
tions with three meals per day, checking the median time times generally conclude that the administration of the in
spent in hyperglycemia, within target, and in hypoglycemia. sulin bolus between 10 and 20 min before the meal leads to
No specific results on the observer performance are reported. reduced glycemic excursions, as compared to mealtime or
They conclude that administering the meal bolus 15 min after after the meal [38], [39].
mealtime both reduces the risk of hypoglycemia when meal Other works address the design of insulin observers, but
size is overestimated by 50% and the time spent in hyperglyce- either an intravenous route is considered, not used in current
mia for a meal size underestimation by 50%. However, admin- AP systems, or endogenous insulin secretion is included,
istration of insulin at mealtime is optimal when the meal size which does not apply to T1D. These works are reviewed below,
U max (k) =)
under development at different stages, of which eight are I CHO (k) + I G (k)-IOB (k) if I CHO (k) +I G (k) 2 IOB (k )
,
based on MPC, six on a PID-type control algorithm, three I CHO (k) otherwise
on FL, and one in a bio-inspired approach. All control strat- (11)
egies must deal with the limitation of insulin infusion for with
the sake of safety. I CHO (k) = M (k) ·IC, (12)
(G (k) - G ss (k)) · CF if G (k) - G ss (k) 2 0
Model Predictive Control I G (k) = ' , (13)
0 otherwise
One of the advantages of MPC is that it can easily incorporate
constraints into the optimization process of the defined cost where I CHO (k) is the insulin needed at time k to compen-
function. An example of such a procedure is given in [50], sate a meal, M (k) is the amount of carbohydrates from the
where a dynamic safety constraint on the maximum rate of meal absorbed at time k, and IC [U/g] is the insulin-to-
insulin delivery based on empirical clinical knowledge is inte- carbohydrate ratio used currently by clinicians (that is, how
grated into an MPC scheme, to avoid overdelivery of insulin. much insulin per gram of carbohydrate must be adminis-
The following constrained cost function is considered tered to compensate a meal). Moreover, I G (k) represents
the insulin needed to compensate for a deviation from the
min ^~ y yt T yt + ~ u u
t T ut + ~ Du Du T Du h, (9) target (considered here to be the steady-state glucose
u!R
concentration) G ss (k), as given by the correction factor
s.t. - 0.5ut ss # ut # U max (k) 61, 1, f, 1@T, (10) CF 6U (mg/dL) -1@ . CF is used by clinicians in current in
s ulin therapy to determine how much insulin must be
where yt ! R p # 1 is the vector of predicted plasma glucose administered to compensate for an excess of one glucose
deviations with respect to the glucose setpoint, with p the concentration unit with respect to the glucose target.
output prediction horizon; ut ! R m # 1 is the vector of future Finally, IOB(k) is the predicted IOB at time k, which is
calculated deviations of the insulin infusion rate with obtained from the convolution of the insulin administered
respect to the basal rate ut ss (that is, the insulin rate required in the last 8 h and a family of “active insulin curves,” as
at steady state to obtain the desired steady-state glycemia), given by insulin pump manufacturers ranging in different
with m the control horizon; and Du ! R m # 1 is the vector durations of insulin action from 2 to 8 h. These curves are
of future insulin infusion increments. The constraint, based on insulin action plots and express the percentage of
expressed in terms of deviations of the insulin infusion rate remaining active insulin along time. Curvilinear and linear
with respect to the basal rate ut ss, indicates that the insulin versions are available, depending on the manufacturer [51].
infusion rate is limited between half its basal value and a Although linear versions are easier to use by patients,
time-dependent maximum deviation from its basal value curvilinear versions represent better subcutaneous insulin
U max (k), given by pharmacokinetics and are preferred. The use of dynamic
where the first term penalizes the error with respect to the u AP = u PID + u basal + u bolus, (18)
setpoint r along the prediction horizon [N d, N m], and the
second term penalizes the control action along the control where u basal is the basal insulin needed by the patient to
horizon with bound N u . Parameters d k and m k are weights. maintain a proper glycemia level between meals and at night
In this case, the following biexponential insulin phar- (basal metabolic conditions), u PID is the additional control
macokinetic model is used: action (insulin delivered) proposed by the PID algorithm to
Factors s Ip and s q in (14) scale the corresponding units of I (t) where the original control action u AP is limited by an action
[U/dL] and q (t) [Umin/dL] into [mg/dL] for an homogeneous proportional to the predicted plasma insulin concentration
cost index. It is noted that q (t) is an area-under-the-curve of I. For this purpose, the biexponential model (2) is used,
plasma insulin concentration, not the mass of insulin. with the transfer function given by
Finally, another relevant MPC-based AP system is pre-
sented in [23], which was already tested in free living con- 1 1
I (s) x1 x2
ditions without supervision over three months [54]. The G PK IFB (s) = = , (20)
K cl c s + 1 mc s + 1 m
u IFB (s)
system includes the following safety checks to avoid excess x1 x2
of insulin delivery [31]: 1) insulin infusion rate is limited to
two to five times the preprogrammed basal rate, depend- which corresponds to (1) with input signal u IFB . The c
ing on the current glucose measurement, the time since the parameter multiplying I must be set by the control engi-
previous meal(s), and carbohydrate content of meal(s); 2) neer. The IFB approach described is, from a classical control
shutting off insulin delivery when the glucose measure- point of view, mathematically equivalent to a cascade con-
ment is below 77 mg/dL; 3) reducing insulin delivery when trol system [30], as shown in Figure 5. For IFB to maintain
I
γ
Figure 5 A block diagram for an artificial pancreas controller with insulin feedback (IFB).
the original insulin infusion u AP at steady state, the original Sliding Mode Reference Conditioning Control
PID parameters must be retuned, or a reduction in insulin SMRC is proposed in [56] to build an external feedback loop
infusion would lead to an increase in glucose concentration called the safety auxiliary feedback element (SAFE), to keep
[30]. To avoid this, the term u AP in (19) must be multiplied by IOB (represented by the size of the subcutaneous insulin depot)
f = ^1 + c lim s " 0 G PK IFB (s) h, which is equivalent to retuning inside predefined limits. This measure differs from the active
the controller’s proportional gain. Integral and derivative insulin curves currently used in insulin pumps that include
terms may also require some adjustments, depending on insulin pharmacodynamics [59]. Upper and lower limits for
the tuning of c. IOB can be defined if desired. SMRC uses the modulation of
The equation glucose targets as a new degree of freedom for glucose regula-
tion (see Figure 6). A prediction of IOB, IOB(t), drives a switch-
u IFB = u AP - c ^I - I B h, (21) ing function v SM (t), triggering a discontinuous signal ~ (t)
that, after a filtering step, sums to the standard glucose target.
presents an equivalent IFB implementation as a limiting The rationale behind SMRC is that it provides an upper limit
action proportional to I - I B, where I B is the predicted of IOB by increasing the desired glucose target. Any controller
basal plasma insulin In this case, the additional term is will react in the sought direction of diminishing insulin infu-
zero in basal (stationary) conditions and PID gain retuning sion. The opposite applies when a lower limit for IOB is desired.
is not necessary. SMRC originates on concepts of invariance control and
Different studies show the good performance of the IFB sliding regimes as a transitional mode of operation. In con-
approach. In [30], simulation results using the Hovorka trast to conventional sliding mode control, the aim here is
model [23] are presented for 24 h with three meals and a not evolving toward the equilibrium point. Only when the
decrement of the peak postprandial excursion. At the same system (by itself) reaches a given sliding surface separating
time, a reduction of late-postprandial hypoglycemia is the space into feasible and unfeasible regions (in this case,
reported. In [55], the ability of IFB to improve the breakfast characterized by the constraint on IOB) is the sliding regime
meal profile in a 30-h closed-loop, in-clinic study with stabilized by conditioning the reference until the system
eight adult subjects with T1D was assessed with a substan- returns (by itself again) to the feasible region. In this sense,
tial improvement over prior studies, but supplemental car- there is no reaching mode because no control effort is done
bohydrates after breakfast were needed for three subjects. to drive the system to the sliding surface [60].
The clinical study also showed feasibility of overnight con- Given a (possibly time-varying) upper limit on IOB
trol. On the other hand, in [57], four subjects were studied ^IOB (t) h and system state x (t), the set
for 24 h and the IFB, as compared to a standard PID con-
R = " x (t)|IOB (t) # IOB (t) , (22)
trol, reduced the occurrence of hypoglycemia without
increasing meal-related glucose excursions. Finally, [58] is invariant (that is, if the initial state fulfills the constraint
presents simulation results of the IFB strategy used in a IOB (t) # IOB (t), then it will be fulfilled for all t 2 0 ) for a
fully implantable AP using intraperitoneal insulin deliv- discontinuous signal ~ (t) of the form
ery and glucose sensing (that is, the peritoneal cavity,
~ (t) = '
~
+
if v SM (t) 2 0
which is the area in the body that contains the abdominal , (23)
0 otherwise
organs, is used for rapid sensing and actuation, better
emulating the healthy pancreatic activity). In this case, the with ~ + 2 0 large enough (see [56] for technical details) and
IFB alone was not enough to attenuate postprandial under-
v SM (t) = IOB (t) - IOB (t) + / x i ^IOB (t) (i) - IOB (t) (i)h, (24)
l -1
shoot but in combination with antiwindup provided very
good results. i =1
ω Insulin
IOB
First-Order Filter σSM Pharmacokinetic
Model
Grf
+
uPID + + uAP
Controller PID(s ) Patient G (s )
– + +
ubolus ubasal
Figure 6 A block diagram for an artificial pancreas controller including the sliding mode reference conditioning control structure.
where l is the relative degree between the output IOB (t) insulin pharmacokinetic model [23] was finally chosen in
and the input ~ (t), superscript (i) denotes the i th deriva- the implementation for clinical evaluation due to parsi-
tive, and x i are constant gains. mony criteria, that is,
The first-order filter
dS 1 (t)
dG RF (t) = u sc (t) - 1 S 1 (t), (26)
dt t maxI
=-aG RF (t) + a (G R (t) + ~ (t)) (25)
dt dS 2 (t) 1
= (S (t) - S 2 (t)) . (27)
dt t maxI 1
keeps all signals in the control loop smooth, where G RF (t) is
the modulated (conditioned) glucose target fed to the con- IOB was then defined as
troller, G R (t) is the standard glucose target (usually con-
IOB (t) := S 1 (t) + S 2 (t) . (28)
stant), and a defines the filter cut-off frequency. Stability of
the system is guaranteed, since the SMRC loop acts only on Figure 7 shows the typical time profile of IOB as defined by
the setpoint, which is always bounded. (26)–(28), expressed as a percentage of the bolus size, yield-
Relative degree l is determined by the relative degree of ing a curvilinear subcutaneous insulin pharmacokinetics,
the filter (25) and the relative degree of the IOB predictor, also characteristic of active insulin curves provided by
since the controller has a proportional action. Although the insulin pump manufacturers [51].
subcutaneous insulin pharmacokinetic model in [61] was Equations (26)–(28) have a relative degree of one, giving rise
considered in the initial work [56] (which is the model in to a total relative degree of l = 2. The switching function (24) is
the UVA/Padova simulator), the Hovorka subcutaneous
v SM (t) = IOB (t) - IOB (t) + x c m . (29)
dIOB (t) dIOB (t)
-
dt dt