Abstract
Background:
Either under standard basal-bolus treatment or hybrid closed-loop control, subjects with type 1 diabetes are required to count carbohydrates (CHOs). However, CHO counting is not only burdensome but also prone to errors. Recently, an artificial pancreas algorithm that does not require premeal insulin boluses—the so-called automatic regulation of glucose (ARG)—was introduced. In its first pilot clinical study, although the exact CHO counting was not required, subjects still needed to announce the meal time and classify the meal size.
Method:
An automatic switching signal generator (SSG) is proposed in this work to remove the manual mealtime announcement from the control strategy. The SSG is based on a Kalman filter and works with continuous glucose monitoring readings only.
Results:
The ARG algorithm with unannounced meals (ARGum) was tested in silico under the effect of different types of mixed meals and intrapatient variability, and contrasted with the ARG algorithm with announced meals (ARGam). Simulations reveal that, for slow-absorbing meals, the time in the euglycemic range, [70-180] mg/dL, increases using the unannounced strategy (ARGam: 78.1 [68.6-80.2]% (median [IQR]) and ARGum: 87.8 [84.5-90.6]%), while similar results were found with fast-absorbing meals (ARGam: 87.4 [86.0-88.9]% and ARGum: 87.6 [86.1-88.8]%). On the other hand, when intrapatient variability is considered, time in euglycemia is also comparable (ARGam: 81.4 [75.4-83.5]% and ARGum: 80.9 [77.0-85.1]%).
Conclusion:
In silico results indicate that it is feasible to perform an in vivo evaluation of the ARG algorithm with unannounced meals.
Introduction
Artificial pancreas (AP) systems usually consist of a subcutaneous insulin pump connected to a continuous glucose monitoring (CGM) sensor through a control algorithm that automatically calculates insulin doses according to CGM measurements. 1 Unfortunately, the subcutaneous route introduces considerable issues, including large delays in glucose measurements and insulin action. 2
The vast majority of AP systems are based on model predictive control (MPC),3-7 proportional-integral-derivative,8,9 and fuzzy logic 10 (see Sánchez-Peña and Cherñavvsky 11 for a thorough description of the current situation). Since high model uncertainty and large delays limit the autonomy of the glucose controller, most of these control strategies are hybrid, ie, a combination of manual meal boluses and automatic basal modulations. However, carbohydrate (CHO) counting implies an important burden and risk for people with diabetes. 12 Therefore, a purely feedback solution is necessary.
Recently, a control algorithm without premeal insulin boluses called automatic regulation of glucose (ARG) was proposed and clinically evaluated in five subjects with type 1 diabetes (T1D) at the Hospital Italiano of Buenos Aires (HIBA).13,14 This algorithm consists of an inner switched linear quadratic Gaussian (SLQG) controller and an outer sliding mode safety layer called safety auxiliary feedback element (SAFE).13,15 The inner controller switches between an aggressive LQG controller to compensate for the effect of meals and other large perturbations, and a conservative LQG controller to maintain normoglycemia at all other times (see also Colmegna et al 16 ). During the clinical study at HIBA, participants were asked to announce the meals and classify them as small, medium, or large. When a meal was announced, a listening mode was triggered and the aggressive controller was selected only if rising glucose values were detected during the following 90 minutes. Information about the meal size was used by the safety layer to adjust the maximum allowable insulin on board (IOB) value for that particular meal. This approach reduced patients’ burden associated with CHO counting. However, our goal here is to maximize patients’ freedom to avoid complications such as those derived from diabetic burnout by eliminating the need for meal announcement, as long as closed-loop performance and patient safety are not compromised.
In recent years, several meal detection algorithms have been explored. In Dassau et al, 17 a voting algorithm is proposed based on different detection methods applied to the CGM signal, using a Kalman filter (KF) and estimations of the glucose rate of change. In Turksoy et al, 18 the proposed detector uses a modified version of Bergman’s minimal model with an unscented KF for state estimation, and the estimated rate of appearance is used for meal detection. In Hughes et al, 19 a method using a stochastic MPC strategy is employed to detect meals through behavioral profiles. In Lee et al, 20 it is proposed to inject reasonable amounts of insulin boluses based on a series of meal impulses and not to estimate the grams of carbohydrates (gCHO) accurately. The algorithm is based on continuous observations of the first and second derivatives of the glucose level to produce a series of meal impulses when a set of conditions is satisfied. Insulin boluses are then combined with an MPC algorithm. In Cameron et al, 21 a probabilistic method for meal detection is developed. This algorithm compares the CGM signal to no-meal predictions made by a simple insulin-glucose model. Then, residuals are fit to potential meal shapes, and finally, these fits are compared and combined to detect any meal. In Mahmoudi et al, 22 two CGMs and an adaptive unscented KF are employed to detect CGM faults and unannounced meals, distinguishing from one another. In Ramkissoon et al, 23 an unscented KF is used to estimate a disturbance term, which alongside CGM readings is utilized to detect meals.
A few AP systems that do not require exact CHO counting have been developed.24,25 However, in these works, meal announcement is used to deliver a meal priming bolus based on a meal size classification. On the other hand, AP systems that do not require any kind of meal announcement involving both single-hormone26,27 and dual-hormone 28 therapy have been proposed as well. Despite achieving good results, there is still an unavoidable compromise between prandial hyperglycemia and postprandial hypoglycemia, mainly due to the slow pharmacokinetics and pharmacodynamics of the current insulin analogs. In Turksoy et al, 26 this compromise was reduced since meals were compensated with an additional module that delivered insulin boluses when an intake was detected. Also, clinical studies involving closed-loop control in patients with noncritical care have been carried out. 29
In this work, the ARG algorithm is combined with a switching signal generator (SSG) to eliminate the need for manual mealtime announcement by automatically commanding the switching between the conservative and aggressive modes. The switching to the aggressive controller is based on the most recent CGM readings and an auxiliary signal generated by a KF. On the other hand, the switching to the conservative controller is made when a decreasing glucose trend is inferred from the CGM signal. The main difference between this AP system and others without meal announcement is that this SSG module is not meant to deliver meal-priming boluses but only to command the activation of the aggressive mode. This mode is selected when a triggering event that can be associated with an increase in the glucose rate of appearance, like a meal ingestion, is detected.
The performance of the proposed algorithm is evaluated in silico using the UVA/Padova simulator 30 with intraday variability and several mixed meals, comparing the performance of the ARG with and without meal announcement (ARGam and ARGum, respectively).
Methods
The ARG Algorithm
The ARG algorithm regulates glycemia without delivering open-loop prandial boluses. Instead, it switches between an aggressive controller
Figure 1 shows a block diagram of the ARG algorithm. The SLQG controller calculates an insulin infusion rate

Block diagram of the automatic regulation of glucose algorithm.
The SAFE layer
Figure 2 shows a block diagram of the SAFE layer. The first block estimates the IOB. The IOB model used here is a two-compartment dynamical system (although any other model or estimator could be used for this purpose) with the following set of equations:
where

Block diagram of the safety auxiliary feedback element algorithm.
If the feedback controller tries to increase the IOB above
Hypo- and hyperglycemia protection
The ARG algorithm, besides the SLQG controller and the safety layer described above, has two additional auxiliary modules to reduce risks of hypo- and hyperglycemia. Hypoglycemia is further prevented by reducing the IOB constraint when low glycemia levels are detected. On the other hand, if the controller is not aggressive enough to compensate for sustained high glucose concentrations during relatively long periods of time, automatic correction boluses (ACBs) will be delivered by the hyper-related module. For a more detailed explanation of the ARG algorithm and its auxiliary modules, refer to Colmegna et al. 13
Meal announcement in the clinical trials at HIBA
As mentioned, the ARG algorithm does not require neither exact CHO information nor feedforward insulin boluses to cope with meal ingestions. However, a manual mealtime announcement was still used during the clinical trial at HIBA to command the switching between
Switching Signal Generator
The signal σ commands the modes of the SLQG controller. Here, an automatic SSG algorithm to establish σ based on CGM readings is proposed to eliminate the need for meal announcement and take a step further toward a fully automatic AP controller.
Figure 3 shows the block diagram of the proposed SSG. The first block is a noise spike filter that limits the maximum blood glucose rate of change to 3 mg dL−1 min−1.
31
The filtered signal
where

Block diagram of the proposed automatic switching signal generator.
To design the KF, a linearized model from the meal input to the glucose output was obtained for every virtual adult of the distribution version of the UVA/Padova simulator at the basal state. In this first approach where no model personalization is considered, the meal-glucose model associated with the most sensitive in silico subject, adult
where the input
where
The SSG determines if the controller should switch to its aggressive mode or not, using
It is worth mentioning that the estimation of
At this stage,
Results
In this section, the performance of the ARGum, ie, the ARG combined with the SSG module, is assessed through diverse in silico tests performed on the UVA/Padova simulator, considering the ten in silico adult cohort and a Dexcom CGM model as the sensor.
In Silico Evaluation Considering Mixed Meals
As mentioned in “Switching Signal Generator” section, the SSG was tuned using the regular meal model of the UVA/Padova simulator.32,33 Therefore, in order to test the robustness of the proposed ARGum, here, it is subject to a battery of tests that include mixed meals with different nutritional composition and absorption rates. 34 Specifically, three sets of 16-hour simulations were designed, each one including a particular mixed meal from the library introduced in León-Vargas. 35 Figure 4 depicts the corresponding absorption rates and Table 1 summarizes their composition. Results are then compared to the ones obtained with announced meals, ie, using the ARGam as described in “Meal announcement in the clinical trials at HIBA” section.

Rate of appearance of the mixed meals used in “In silico Evaluation Considering Mixed Meals” section. The solid blue line corresponds to a fast-absorbing meal, the dotted red line to a slow-absorbing meal, and the dashed yellow line to a double-peak meal.
Mixed Meals Used in the First Set of Simulations.
Abbreviation: CHO, carbohydrate.
Slow-absorbing meal
Postprandial glucose excursions related to slow-absorbing meals are difficult to mitigate for closed-loop algorithms like the ARG that does not use feedforward insulin boluses and lack integral action to avoid insulin stacking. In this case, the decay of glucose to normoglycemia may be slow, since the insulin signal is mainly sensitive to the glucose rate of change, which tends to be slow for this type of meals. Here, both the ARGam and the ARGum are subject to a high-fat low-CHO meal. Results are presented in the first row of Figure 5 and the first column of Table 2. As shown, the percentage of time within the target range of 70 to 180 mg/dL is higher with the ARGum than with the ARGam. The reason is that the ARGum does not switch back to the conservative mode until the CGM readings start to decrease, while the ARGam switches back to the conservative mode automatically one hour after the aggressive mode is triggered. In the latter case, it can be observed that although the ACBs play a key role in lowering the glucose values after the conservative mode is resumed, its action is not as effective as the one generated by the ARGum. While time in range is similar between the ARGam with and without ACBs, the first row of Figure 5 shows that the use of ACBs results in a faster return to the euglycemic range.

Mean glucose and insulin ± one standard deviation for the mixed meal simulations. The first column displays the results with the hyperglycemia protection layer and the second column shows the results without the use of automatic correction boluses. The first row corresponds to the slow-absorbing meal, the second row to the fast-absorbing meal, and the third row to the double-peak meal. The purple lines correspond to the automatic regulation of glucose algorithm with announced meals and the orange lines to the automatic regulation of glucose algorithm with unannounced meals. The dashed green lines show the desired range, and the dashed yellow line shows the acceptable range.
Results (Median [0.25-0.75 Quantile]) for Three Kinds of Mixed Meals Using the Automatic Regulation of Glucose Algorithm With Unannounced Meals and the Automatic Regulation of Glucose Algorithm With Announced Meals With and Without the Hyperglycemia Protection Layer.
Abbreviations: ACB, automatic correction bolus; ARGam, automatic regulation of glucose algorithm with announced meals; ARGum, automatic regulation of glucose algorithm with unannounced meals.
Fast-absorbing meal
The second row of Figure 5 and the second column of Table 2 summarize the results for a fast-absorbing mixed meal. As expected, similar responses are achieved under ARGam and ARGum, due to the fact that the meal is rapidly absorbed. In addition, given that no ACBs are administrated, the results with and without activating the hyper-related module are almost identical (slight variations are related to measurement noise).
“Double-peak” meal
The third row of Figure 5 shows the mean glucose and mean insulin ± one standard deviation (SD) obtained with both the ARGum and the ARGam for a mixed meal that presents “double peak,” which is difficult to control with an algorithm that depends on a meal announcement. The third column of Table 2 summarizes the results for this meal. As expected, the first peak is better compensated by the ARGam, since a meal announcement was used and the switching to the aggressive controller was made earlier than with the ARGum. However, since the ARGum switches to the aggressive mode when a hyperglycemia episode might occur, it can compensate the second peak more efficiently than the ARGam, which highly depends on ACBs to reduce substantial glucose excursions. The advantage of using the ARGum to compensate this type of meals is better illustrated when the hyper-related auxiliary module is not activated. Note that the ARGum mitigates faster the delayed glucose peak than the ARGam without ACBs (the right-hand side of Figure 5).
In Silico Evaluation Considering Intrapatient Variability
A second set of simulations was performed in order to evaluate the performance of the ARGum under intrapatient variability. To this end, intraday variability of insulin sensitivity (SI) was considered, following the work of Visentin et al. 36 There, SI was characterized by two parameters: Vmx that governs the insulin-dependent glucose utilization and kp3 that governs the insulin action on the liver. Seven SI daily patterns were defined based on the level of SI at breakfast (Vmxb, kp3b), lunch (Vmxl, kp3l), and dinner (Vmxd, kp3d), and each in silico subject was randomly associated with one of them. Thus, to represent intraday variability, Vmx and kp3 were transformed to time-varying parameters. To this end, they were defined as step-wise signals that vary three times a day and then smoothed using a low pass filter. Deviations from the nominal values were allowed by modulating the nominal pattern with a multiplicative noise normally distributed with mean 1 and SD 0.2. The simulation scenario was designed to replicate the clinical trial at HIBA, which had a duration of 36 hours (start time 6 PM) and five meals: two dinners (55 gCHO each), one breakfast (28 gCHO), one lunch (55 gCHO), and an afternoon snack (28 gCHO).
The time responses to this protocol are depicted in Figure 6. Time spent in the euglycemic range was similar under both controllers (ARGam: 81.4 [75.4, 83.5]% and ARGum: 80.9 [77.0, 85.1]%). Although the ARGum may remain in the aggressive mode longer and the default

Mean glucose and insulin ± one standard deviation for the simulations with intrapatient variability. The purple lines correspond to the automatic regulation of glucose algorithm with announced meals and the orange lines to the automatic regulation of glucose algorithm with unannounced meals. The dashed green lines show the desired range and the dashed yellow line shows the acceptable range.
Discussion
Although promising results were obtained with the ARG algorithm with meal announcement in the clinical trial at HIBA, the end goal is to eliminate the need for meal announcement and design an appropriate method to switch between the two LQG controllers (
Despite this, the ARGum presents also some disadvantages due to the lack of meal announcement. The first one is a potentially higher glucose peak after meals, as a result of the increased delay in the switching from
It is worth highlighting that the mealtime announcement does not directly trigger the ARGam into the aggressive mode. Instead, the ARGam has a simple “meal detection” algorithm to confirm that a meal is present. Therefore, it must be kept in mind that, in this work, the ARGum was contrasted with a strategy that already has a delay in meal compensation and not with a perfect meal-bolus therapy. Finally, note that faster insulin analogs could mitigate the impact of this inherent delay on glucose control by helping to align the insulin and meal rates of appearance.
Conclusion
In this work, an algorithm to automatically command the switching between the conservative and the aggressive mode of the clinically tested ARG AP controller was designed and evaluated in silico. Promising preliminary results were obtained, indicating that the proposed strategy is robust with respect to different meals and intraday variability in SI. Therefore, it can be concluded that a clinical trial with the ARGum is feasible.
Footnotes
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research has been supported by the Argentinean Government (PICT 2017 3211 Agencia Nacional de Promoción Científica y Tecnológica, PIP 112-201501-00837 CONICET, UNLP 11/I216), Fundación Nuria, and JDRF (Grant 2-APF-2019-737-A-N).
