Abstract

The artificial pancreas (AP) is a system intended to control blood glucose levels through automated insulin infusion, reducing the burden of subjects with type 1 diabetes to manage their condition. To increase patients’ safety, some systems limit the allowed amount of insulin active in the body, known as insulin-on-board (IOB). The safety auxiliary feedback element (SAFE) layer has been designed previously to avoid overreaction of the controller and thus avoiding hypoglycemia. In this work, a new method, so-called “dynamic rule-based algorithm,” is presented in order to adjust the limits of IOB in real time. The algorithm is an extension of a previously designed method which aimed to adjust the limits of IOB for a meal with 60 grams of carbohydrates (CHO). The proposed method is intended to be applied on hybrid AP systems during 24 h operation. It has been designed by combining two different strategies to set IOB limits for different situations: (1) fasting periods and (2) postprandial periods, regardless of the size of the meal. The UVa/Padova simulator is considered to assess the performance of the method, considering challenging scenarios. In silico results showed that the method is able to reduce the time spent in hypoglycemic range, improving patients’ safety, which reveals the feasibility of the approach to be included in different control algorithms.

1. Introduction

Type 1 diabetes (T1D) is a chronic condition in which the pancreatic beta-cells either stop or reduce drastically the production of insulin. Insulin is a hormone whose function is to facilitate the glucose uptake from the bloodstream into the cells to be used or stored. Subjects with absence of insulin in the body face very high levels of blood glucose (BG) (hyperglycemia), which can lead to long-term micro- and macrovascular complications [1, 2]. Therefore, subjects living with T1D must inject insulin exogenously in order to regulate blood in a lifelong challenge [3], and intensive insulin therapy reduces the risk of long-term complications [4]. But maintaining blood glucose levels into near-normoglycemia is not a trivial task, and if insulin is overdosed, BG may fall to dangerously low levels (hypoglycemia), which can lead to serious hazards, such as diabetic coma or even death [5].

Over the last years, researchers have been working towards a closed-loop system to control BG automatically [6]. This system, known as artificial pancreas (AP), is usually composed of a continuous glucose monitor (CGM), a control algorithm, and continuous subcutaneous insulin infusion through a pump. Insulin-only AP systems consider only insulin infusion to control BG, and dual-hormone AP systems also consider glucagon infusion to elevate BG to reduce the risk of hypoglycemia. AP systems can also be classified into two different categories based on the degree of automation: hybrid closed-loop system, in which subjects are involved in the control loop and must announce meals or other disturbances to anticipate their effects, and fully closed-loop systems, where no actions are required from the patients [7, 8].

One of the main challenges of the AP system is achieving postprandial glucose control mainly because the insulin absorption through the subcutaneous tissue is slower than the appearance of glucose in the blood after a meal [9]. Due to this difference in dynamics of insulin action and carbohydrate (CHO) absorption, attempts to avoid hyperglycemic peaks are usually accompanied by hypoglycemic excursions [10]. Several approaches have been tested to overcome such issue [1114], but while an ultrarapid insulin analogue is not available [15], postprandial control using subcutaneous route will continue to be a challenging situation for closed-loop systems. Diverse studies have included estimations of insulin concentration in the body to avoid excessive insulin stacking [1619]; however, hypo- and hyperglycemia are still a hazard for AP systems, and novel approaches are still required.

Revert and colleagues introduced a safety auxiliary feedback element, so-called SAFE layer [20], to limit excessive insulin in the subcutaneous tissue, i.e., insulin-on-board (IOB). This layer is based on the sliding mode reference conditioning technique [21] and acts on the glucose reference signal when a specific constraint, related with the maximum IOB allowed (), is violated. Such technique has already been applied in different control schemes [2225], but so far it is not clear the best methodology to tune . The selection of the constraint is critical in the design of the closed-loop system. This parameter regulates insulin infusion based on an estimation of the IOB. As higher , more insulin the controller will be allowed to deliver. Considering that once insulin is injected into the body, it cannot be removed, it will act naturally lowering BG levels.

The Spanish Consortium on Artificial Pancreas and Diabetes Technology has been working over the last decade on the development of a new artificial pancreas system. In the first clinical trial, to evaluate the performance of the PD controller with the SAFE layer, an individualized constraint was designed to control postprandial BG levels after the consumption of a meal with 60 grams of CHO [26]. The closed-loop controller achieved better outcomes compared with the open-loop therapy, reducing significantly the time spent in hyperglycemia without increase the risk of hypoglycemia. However, a limitation of this study is that was tuned for this specific meal size. Therefore, novel approaches on how to select for meals of different sizes are required to cope with daily-life operation of an AP system. In this work, a novel approach to tune is presented. This new approach takes into account previous open-loop therapy to set for periods without meals and in case of the announcement of meals, can be raised to reduce hyperglycemia without leading to hypoglycemia in the late postprandial period. The proposal is evaluated in silico using the UVa/Padova simulator [27].

2. Materials and Methods

2.1. Control-Loop Scheme

In this section, the control scheme considered in this work is introduced. The control algorithm consists of two loops, as depicted by Figure 1. The inner loop is composed by a proportional derivative (PD) controller with an insulin feedback (IFB) loop. The outer loop contains the SAFE layer [20], which is inspired on the sliding mode reference conditioning technique [21]. This SAFE layer applies a discontinuous signal generated by a switching law when estimations of IOB () surpass a preset limit of IOB (). Later, the discontinuous signal is filtered generating a smooth reference signal () to be applied into the controller. Therefore, this safety layer is able to maintain IOB inside desired bounds.

The control action produced by the PD controller is presented as follows:where is the proportional gain, is the derivative time, is the glucose reference filtered after the action of the SAFE layer, and is the interstitial BG measurements provided by the CGM.

Then, the control action computed by the PD is augmented by two feed-forward signals: and . The signal is the insulin obtained from patients’ daily basal profile. The term is an impulse signal in case of the announcement of meals to compensate the disturbance caused by the ingestion of CHO.

The IFB algorithm [28] emulates the beta-cell physiology in healthy subjects, suppressing insulin secretion as plasma insulin concentration increases. The combination of the PD algorithm with both SAFE layer and IFB algorithm has already been investigated and shown to be more effective than when they are used separately [29]. The final control action signal provided to the insulin pump iswhere γ is gain parameter and is the is the estimated deviation of plasma insulin from steady state conditions (basal levels).

The term in equation (1) is the conditioned reference due to the action of the SAFE layer to maintain IOB below . Since the IOB is inaccessible, an insulin absorption model is considered to estimate IOB [30], through the following equation:where and are two compartments, is a constant related with the duration of insulin action (DIA), and is the estimation of IOB. The SAFE layer has a software-based nature and consists of two main elements: a switching block responsible to generate a discontinuous signal to maintain into the desired range and a first-order filter to smooth the discontinuous signal before being applied to the main controller.

Consider the sliding function defined by equation (4), the switching logic is defined as follows:with W > 0 mg/dl.

Finally, the discontinuous signal is filtered by the following equation and generates smooth changes in the glucose reference signal:

Note that when , is greater than . In order to drive to the desired range, i.e., below , must be decreased. The addition of W in equation (6) generates greater than , diminishing the insulin suggestion provided by the main controller and thus reducing . When is below , no further action is provided by the outer loop, letting the controller work freely.

2.2. IOB Constraint Tuning

The selection of the constraint is a critical point in the design of the control system. In this work, a new tuning approach for is presented. In patients with T1D, insulin requirements vary during the day and also between days (intra- and interday variability). On traditional insulin pump therapy, physicians configure patients’ pump to deliver a steady flow of basal insulin to cope with intraday variability. In addition, insulin boluses are delivered when meals are informed by patients, to cover the disturbance caused on glycemic balance due to the ingestion of CHO [3].

The artificial pancreas under development by our research group has been evaluated clinically, where 20 T1D subjects (age 40.7 ± 10.4 years, T1D duration 22.2 ± 9.9 years, and A1c 7.8 ± 0.7%) used the CL system in front of a mixed meal containing 60 grams of CHO [26]. In this trial, an individualized tune was considered in order the improve postprandial glycemic control when compared with standard open-loop therapy. For this specific trial, where a single meal with 60 grams of CHO was consumed, was adjusted based on parameters taken from patients’ open-loop therapy and computed in an offline procedure. The procedure to compute was as follows: considering that patients were in basal levels of IOB, was computed as the estimation of IOB levels 90 minutes after the administration of an augmented bolus, by equation (3), to compensate this 60 grams meal. This augmented bolus was computed by adding to the standard bolus the amount of basal insulin that would have been delivered in the next hour in the case of being in open-loop therapy. Therefore, knowing in advance the size of the meal and all the parameters necessary to compute this augmented bolus, it was possible to compute in an offline fashion what would be the estimation of IOB levels 90 minutes after the meal bolus. This single value was applied as IOB limit during in this clinical trial [26].

Due to the huge amount of insulin in meal boluses, violates , and a high frequency discontinuous signal is generated by the SAFE layer in order to return back to bounds. This action forces insulin delivery to zero for approximately 90 minutes, minimizing the effects of controller’s overcorrection. When (equation (4)), insulin infusion may be restored if the controller deems necessary.

However, a single value of may not be sufficient for 24-hour operation, especially due to the large intrapatient variability in T1D and to the different activities performed by subjects in their daily-life. The major problem observed in the strategy presented previously is that too high values of may cause that the SAFE layer be ineffective because it will act in very few conditions, e.g., only after a meal bolus. It is comprehensible having higher tuning during postprandial periods, especially because subjects tend to underestimate the CHO content in meals [31]. However, during late postprandial period, where the effects of meals have been covered either by the bolus or by the controller suggestions, such high values of may lead to excess of insulin in the body, increasing the risk of hypoglycemia.

In this work, a new method to tune to overcome the limitations presented by the former strategy is proposed. The new approach is called “dynamic rule-based” (DRB) algorithm and is intended to be used on hybrid artificial pancreas systems for 24-hour operation, where meals of any size are consumed. The proposed approach combines two different strategies to set for different situations: (1) fasting periods: where no big disturbance is expected, and the controller must deal mainly with intraday variability and (2) postprandial periods: where a substantial raise in BG levels is expected due to the consumption of a meal and insulin bolus may not be enough to compensate such disturbance. In summary, the DRB algorithm generates a time-varying based on patients’ basal insulin profile taken from open-loop therapy, and when a meal is announced, the algorithm evaluated in real-time if should be increased temporarily in order to reduce hyperglycemia. The following sections depict the algorithm, and a flowchart is also presented in Figure 2 to clarify the operation of the DRB algorithm.

2.2.1. Fasting Periods

During fasting period (sleeping hours or daytime fasting periods), the absence of external disturbances makes the intraday variability the major challenge for the controller. The basal insulin profile from patients’ open-loop therapy is considered to create a baseline for :where is the baseline for and is a gain that regulates the amplitude of , with . In case of , will not be allowed to be greater than it would have been during open-loop therapy. On the contrary, with , the insulin controller can suggest more insulin than what is programmed by the open-loop therapy. Thus, should be selected in order to protect patients from hypoglycemia but also allowing the control algorithm to suggest insulin above open-loop regimen when necessary. Thus, during fasting periods, is set to be equal to . In this work, the parameter is set to 1.3 for daytime period (06:00–23:00) and to 1.1 for night-time period (23:00–06:00).

Although this approach may be able to provide good glycemic control in front of intraday variability, patients in free-living conditions take CHO on several occasions during the day, requiring a greater amount of insulin for these periods. Therefore, the strategy of during fasting periods is combined with another one, intended for postprandial periods, presented in the following section.

2.2.2. Postprandial Periods

The tuning of during postprandial period is an extension to the method already validated clinically by Rossetti and colleagues [26]. Here, the method is generalized for meals with different amount of CHO and also includes a set of rules based on BG readings to modify . This set of rules has been designed to determine if it is necessary to increase , for cases which the bolus was not enough to drive BG to near-normoglycemia levels.

The method works as follows: in case of the announcement of a meal, an insulin bolus is delivered as a feed-forward action. This bolus is an augmented version of the standard bolus computation, by adding a portion of the future basal delivery according to the size of the meal, as shown in the following equation:where is the content of CHO of the meal (in grams), is the insulin-to-CHO ratio, is the BG reference, and is the correction factor.

After the bolus, surpasses , and then is forced to zero, while is greater than , due to the action of the SAFE layer. The parameter (in minutes, equation (9)) is introduced to regulate the starting time after the meal from when may be increased. After minutes, BG readings start to be evaluated in order to check whether needs to be increased, aiming to drive BG below a selected target (). If in this moment, BG is greater than a threshold (), a new IOB limit is computed to control postprandial BG, based on equation (10). This value is maintained as , while BG is greater than . Finally, when BG returns to values below , returns to follow . Note that the parameters and can be adjusted intuitively by physicians. For a more aggressive postprandial control, these parameters should be decreased as follows:

The final tuning for is determined during a real-time procedure, based on the dynamic behavior of patients basal insulin profile and also in the set of rules activated after the announcement of meals, to increase during postprandial periods. Figure 2 depicts a flowchart of the proposed method to facilitate the understanding.

The variables “PP_state” and “flag_PP” included in Figure 2 were considered for implementation purposes. In the initialization of the system, both variables should be set to zero. “PP_state” indicates that a meal has been consumed, and that may be increased considering a set of rules to evaluated BG levels minutes after the announcement of the meal. The variable “flag_PP” guarantees that a single value of is computed for each meal. Figure 3 depicts the application of the method in one representative virtual patient during a simulation, with a meal containing 45 g of CHO at 07:30 (represented by the green triangle in Figure 3(a)). Note that 67.5 minutes after the meal (computed by equation (9)), the limit of IOB has been increased because BG levels were above . When was increased, the controller suggested more insulin in order to reduce the postprandial excursions since the insulin bolus was not enough for this specific meal. This period of time represents the first meal of a single patient during Scenario C, which is detailed in Section 2.3.3.

In summary, the DRB algorithm has been designed to make use of patients’ basal profile, which is an indicative of insulin requirements along the day, combined with a modified version of the approach already tested clinically with real patients, which achieved good results during postprandial control. In addition, BG measurements has been incorporated to set , aiming to track glucose back to regular values safely. All the relevant parameters used in the simulations are listed in Table 1.

2.3. In Silico Evaluation

The proposed method is validated in the UVa/Padova simulator [27] on three challenging scenarios, including intrapatient variability in insulin sensitivity and in meal absorption rate [32].

Circadian variability has been included to simulate different requirements of insulin during the day and follows a sinusoidal variation. The parameters and , which are related with the insulin sensitivity are modified as follows:where is the corresponding time-varying parameter; is the default individual parameter value ( or ), and is a uniformly distributed random number between 0 and 1.

Additionally, meal absorption rate and insulin absorption parameters (parameters , , , and ) assume different values (±30% around the standard value) after every single meal consumption. Further details about the aforementioned parameters are described elsewhere [27, 33].

2.3.1. Scenario A

This scenario is considered to compare the performance of the DRB algorithm () against the method already validated clinically, with a fixed value for (). In a 7-day scenario, the adult cohort consumed a single meal containing 60 grams of CHO per day, between 10:00 and 16:00, in order to assess the postprandial control under different intrapatient variability conditions. This amount of CHO has been selected to conduct a fairly comparison since the former strategy was clinically validated for this specific meal size.

2.3.2. Scenario B

This scenario is considered to compare the performance of the DRB algorithm () in front of meals with CHO content varying between 40 and 120 grams of CHO. In a 45-day scenario, the adult cohort consumed a single meal per day, between 08:00 and 19:00, in order to assess the postprandial control under different intrapatient variability conditions. It is considered just a single meal per day in order to avoid the accumulated effects of meals in the results.

2.3.3. Scenario C

A 14-day scenario is considered to assess the performance of the proposed method intended to mimic real-life operation of the AP systems. A total of three meals, with different amounts of CHO, are consumed per day at 7:30 (45 grams), 13:00 (90 grams), and 18:30 (50 grams). An error of on CHO counting has also been included to challenge the system. To apply meal absorption variability, the 10 mixed meal models from each patient were randomly assigned for each meal intake along with the simulation. A total of four different strategies are applied in this scenario: (1) the DRB algorithm to adjust (), (2) a fixed value of as used in Scenario A (), (3) is set to be equal to , without the rules considered for postprandial period (), and (4) the same insulin controller considered in other strategies, but without .

3. Results and Discussion

In this section, glycemic outcomes are presented for all the scenarios previously described. The performance of different methods to adjust is evaluated according the time spent into different glycemic ranges [34]. Results are computed based on CGM measurements. Individual metrics for the adult cohort from the simulator are computed, and then the results are presented as the median (25th–75th percentile) among the cohort. Additionally, the occurrence of hypoglycemic episodes (defined as at least 15 consecutive minutes with glucose below 70 mg/dl) is also analyzed.

3.1. Scenario A

Table 2 shows the metrics for Scenario A. These metrics assess the performance of and during postprandial period (i.e., 4 hours following the meal), once the last has been designed for such purpose. The metrics used for this evaluation are: average BG levels, percentage of time spent in different glycemic ranges, glycemic excursion (defined as the difference between the maximum BG level and the premeal BG level), and the total insulin delivered by the controller after the meal bolus.

Note that both strategies achieved similar results. Although obtained numerical results slightly superior than the proposed method, no significant difference was observed in any of the metrics. The new strategy (), besides being applicable for meals of any size, achieved equivalent outcomes when compared with the former strategy, which was designed for meals with 60 grams of CHO and achieved good results in real patients.

However, analyzing the whole simulation period (7-days), the new strategy was able to eliminate the occurrence of hypoglycemic events, while five events were observed for . This fact reinforces the hypothesis that modifying over the day increases patients safety.

3.2. Scenario B

Table 3 shows the metrics during postprandial period in Scenario B for the two methods applied in this Scenario B.

Different from Scenario A, in Scenario B, meals from different sizes were considered to evaluate the postprandial performance of the controller, which is more realistic. Results showed a slight superiority of the against the in all the glycemic metrics analyzed. Notice that the percentage of time spent in tight glycemic range increased from 38.1% to 41.52%, while the percentage of time spent in hyperglycemia reduces at the same time, from 15.63% to 14.14%. This analysis shows that the previous tuning of may not be sufficient for varied size of meals.

3.3. Scenario C

Table 4 shows the results for the 14-day scenario comparing the system with the DRB algorithm () against the other strategies. It displays the mean glucose, percentage of time spent in different glycemic ranges and the number of hypoglycemic events for the entire cohort.

The results display the solid performance of the strategies using the SAFE layer when compared with the insulin controller without IOB limitation, mainly to avoid hypoglycemia. The arm with the strategy achieved the lowest amount of hypoglycemic events when compared with the other methods. The strategy is the one with the lowest mean glucose values during daytime, but the fixed value of is not enough to avoid hypoglycemic events, especially during night-time. On the contrary, the arm considered only the adjustment for presented in Section 2.2.1. Such approach did not consider the rule-based algorithm to increase during postprandial periods, and this is reflected in the slightly worse outcomes for this strategy when compared with , during daytime. The arm achieved lower mean glucose values and spent less time in the hyperglycemic range, when compared with the arm.

Also during daytime, it can be observed that achieved higher mean glucose values when compared with the insulin controller without , considerably above the . Although these values are higher than in healthy people, they are still acceptable considering the recommendations of the American Diabetes Association (ADA) [35], which is A1C <7% for nonpregnant adults. The median GMI (glucose management indicator) achieved by the proposed method during daytime is 6.7%, which gives the approximate A1C levels based on CGM measurements [36]. During night-time, was able to lower mean glucose, without any hypoglycemic event. Considering 24-hour period for the entire scenario, the proposed method achieved a median GMI of 6.5%, within the limits recommendable by the ADA.

The control-variability grid-analysis (CVGA) [37], in Figure 4, allows a graphical visualization regarding the glycemic variability within an observational period of 24 hours. Note that the approach achieved the highest percentage of points falling either in Zone A or Zone B, with 97.85%. Additionally, Figure 5 shows the dynamics of BG and insulin delivery for a single day, comparing with the arm without IOB limits, to better illustrate the influence of the in the control action.

Observing the results in Table 4 and Figure 4 it is possible to note that the action of the SAFE layer avoids the overreaction of the insulin controller due to the rise of glucose, caused by the meals. Although the results obtained by the DRB algorithm are only slightly better when compared with the other strategies which included the SAFE layer, it was observed a reduction on the occurrence of hypoglycemic events without leading to excessive hyperglycemia. All the three hypoglycemic events observed in the arm were caused by the meal bolus and not by any insulin suggested by the controller after the meal. Therefore, the hypoglycemic episodes were very likely caused by overestimation of CHO content to compute the bolus.

The starting point of the proposed method was another strategy which has already been extensively tested both in silico and clinically, making the task of achieving better results even more difficult. Nevertheless, it has been possible to improve slightly the performance of the AP system in this in silico study, being able to apply different limits of IOB according to the CHO content of meals and by applying a lower during night-time. Any improvement in postprandial glycemic control can reflect in a reduction on the risks associated with long-term complications, given its correlation with A1C levels [38], and the avoidance of nocturnal hypoglycemia is a major concern in T1D treatment. In addition, it also allows modification on the parameters of the proposed algorithm to be performed intuitively by physicians, if they deem necessary to further improvements on glycemic control. However, clinical trials involving real patients must be conducted to assess the performance of the proposed algorithm under real-life operation, in which patients may forget to announce meals, and the performance of the DRB algorithm may not be suitable to avoid hyperglycemia. Furthermore, the DRB algorithm may not be applicable in fully automatic AP systems, in which patients do not need to announce meals. Finally, the adjustments of is a major task for AP systems which considers the SAFE layer, and the proper adjustment of this constraint also plays an important role even during physical activity [39, 40], by reducing the amount of injected insulin during and after exercise.

4. Conclusions

The dynamic rule-based algorithm proposed in this work has been designed to tune in real-time limiting of IOB to safely control BG levels. This algorithm is intended for 24-hour operation, which includes postprandial and fasting periods. During postprandial periods, it allows the increase of IOB limits when more insulin is required to have a more aggressive controller but yet safe. The strategy has been evaluated in silico under challenging conditions and achieved satisfactory performance, with emphasis on the reduction of hypoglycemic events during nocturnal period and without excessive hyperglycemia during postprandial period for meals with different CHO contents. Although, in this paper, the proposed strategy has been applied and evaluated in a PD controller, such approach could also be used by other algorithms, since the SAFE layer can be added to control algorithms of any nature.

Abbreviations

ADA:American Diabetes Association
AP:Artificial pancreas
BG:Blood glucose
CGM:Continuous glucose monitor
CHO:Carbohydrates
DIA:Duration of insulin action
DRB:Dynamic rule-based
IFB:Insulin feedback
IOB:Insulin-on-board
PD:Proportional derivative
PK:Pharmacokinetic
SAFE:Safe auxiliary feedback element
T1D:Type 1 diabetes.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work has been partially funded by the Spanish Government (grant no. DPI2016-78831-C2-2-R), National Counsel of Technological and Scientific Development, CNPq-Brazil (grant nos. 207688/2014-1 and 202050/2015-7), and Formación de Professorado Universitario (grant no. FPU0244 2015).