Skip to main content
Diabetes Technology & Therapeutics logoLink to Diabetes Technology & Therapeutics
. 2018 Mar 1;20(3):235–246. doi: 10.1089/dia.2017.0364

Automatic Detection and Estimation of Unannounced Meals for Multivariable Artificial Pancreas System

Sediqeh Samadi 1, Mudassir Rashid 1, Kamuran Turksoy 2, Jianyuan Feng 1, Iman Hajizadeh 1, Nicole Hobbs 2, Caterina Lazaro 3, Mert Sevil 2, Elizabeth Littlejohn 4, Ali Cinar 1,,2,
PMCID: PMC5867514  PMID: 29406789

Abstract

Background: Automatically attenuating the postprandial rise in the blood glucose concentration without manual meal announcement is a significant challenge for artificial pancreas (AP) systems. In this study, a meal module is proposed to detect the consumption of a meal and to estimate the amount of carbohydrate (CHO) intake.

Methods: The meals are detected based on qualitative variables describing variation of continuous glucose monitoring (CGM) readings. The CHO content of the meals/snacks is estimated by a fuzzy system using CGM and subcutaneous insulin delivery data. The meal bolus amount is computed according to the patient's insulin to CHO ratio. Integration of the meal module into a multivariable AP system allows revision of estimated CHO based on knowledge about physical activity, sleep, and the risk of hypoglycemia before the final decision for a meal bolus is made.

Results: The algorithm is evaluated by using 117 meals/snacks in retrospective data from 11 subjects with type 1 diabetes. Sensitivity, defined as the percentage of correctly detected meals and snacks, is 93.5% for meals and 68.0% for snacks. The percentage of false positives, defined as the proportion of false detections relative to the total number of detected meals and snacks, is 20.8%.

Conclusions: Integration of a meal detection module in an AP system is a further step toward an automated AP without manual entries. Detection of a consumed meal/snack and infusion of insulin boluses using an estimate of CHO enables the AP system to automatically prevent postprandial hyperglycemia.

Keywords: : Artificial pancreas, Meal detection, Meal size estimation, Qualitative representation, Fuzzy estimation.

Introduction

People with type 1 diabetes (T1D) require the administration of exogenous insulin, either through multiple daily injections or through continuous subcutaneous insulin infusion (CSII), for glucose regulation. Artificial pancreas (AP) systems aim at automating the regulation of blood glucose concentration by integrating a continuous glucose monitor (CGM) and CSII pump with a closed-loop control algorithm.1–11 Maintaining prandial glucose level in a safe range without manual meal information (time and carbohydrate [CHO] content of the meal) is still a challenge for the AP system. The desire to move toward more automated AP systems and to eliminate manual user entries can be achieved by integrating a meal detection and CHO estimation module into the AP system.

Several studies have addressed the detection of unannounced meals and approximation of the CHO amounts through the estimation of the effects of the consumed CHO on either the glucose concentrations or required insulin boluses (possibly via the estimation of parameters in insulin-glucose models). A voting meal detection algorithm consisting of four different ways to compute glucose rate of change was designed.12 A combination of meal library and meal detection algorithm in the framework of model predictive control is used to minimize user intervention.13 An algorithm based on logical criteria for the continuous observation of the first and second derivatives of subcutaneous glucose concentration (SGC) levels estimates the magnitude of meal impulses that are then converted to grams of CHO.14,15

A probabilistic detection algorithm is also proposed to identify the presence and to estimate glucose appearance based on pre-defined meal shapes.16–19 A glucose rate increase detector was designed to identify a prolonged increase of prandial glucose.20 An unscented Kalman filter estimates the glucose rate of appearance in an extended Bergman's minimal model,21 and the glucose regulation as the result of the suggested multi-step insulin dosing for the detected meal is compared with the no-meal announcement case.22 A variable state dimension approach is used to detect meals and to estimate the meal size by using a Kalman filter that switches its operation between two models.23 A physiological parameter-invariant meal detector was proposed by defining a design score equivalent to the confidence level in the occurrence of meal based on the minimal glucose-insulin model.24

In our previous work, we introduced an automated meal detection algorithm based on fuzzy qualitative analysis of CGM data,25 and an estimation technique that quantifies CHO amount in unannounced meals using CSII pump and CGM data. We compared our automated meal detection and CHO estimation algorithm with a meal announced approach by using the virtual patients of the University of Virginia/Padova (UVa/Padova) metabolic simulator.26 In this study, we evaluate the integration of the developed meal detection and size estimation method in our multivariable AP system by using clinical experiments. In the method section, we first provide an overview of detection and estimation algorithms and then discuss the adaptions made to embed the meal module into the multivariable AP used in clinical experiments. Thus, the AP with automated meal bolus determination is able to regulate glucose concentration variations caused by unannounced meals under conditions similar to daily life (variations in meal times, exercise, and sleep).

Methods

Meal detection and CHO estimation algorithm

The meal detection and CHO estimation algorithm is illustrated in Figure 1. The data-driven meal detection is based on the fuzzy qualitative analysis of CGM time series data. The subsequent estimation of the meal CHOs uses a fuzzy system to leverage the inherent information within the CGM and CSII data. The estimator uses derived features from the available CGM and CSII data to quantify consumed CHOs. Employing a fuzzy-logic-based model as the estimator precludes the use of mathematical insulin-glucose dynamic models. A discussion of the details for various steps of the algorithm is provided in Samadi et al.25

FIG. 1.

FIG. 1.

Meal detection algorithm flowchart; n denotes the time step. Activation, deactivation, and pause criteria are defined based on threshold rules for increase of the glucose trend variable.

In the algorithm flowchart (Fig. 1), the notion of meal flag plays an important role. Initially, the meal flag is inactive. The meal flag is used to indicate the presence of a meal. It becomes “active” when a meal is detected by the algorithm and remains in this state during the meal period. The start and end of an active meal flag period are determined by satisfying the activation and deactivation criteria, respectively. The total amount of CHO consumed is estimated gradually over the period when the meal flag is active. There is no CHO estimation when meal flag is inactive or paused. The “pause” state is declared based on criteria that are safety rules that moderate CHO estimation and insulin suggestion to prevent hypoglycemia that may be caused by overdose of insulin.

The three criteria (activation, pause, and deactivation) are defined based on the thresholds for the magnitude of the “increase of glucose trend” variable, IGT. IGT is updated at every CGM sampling time (5 min) and used as the meal detection feature. If the meal flag is active (and the pause criteria are not satisfied), the fuzzy system gradually estimates absorbed CHO at each sampling time as the glucose dynamics evolve (Fig. 1).

The qualitative variables describe different patterns of change for the measured glucose within a time window.27 The qualitative variables are associated with a unique combination of the signs of the first and second derivatives, and they are used to compute the meal detection feature IGT. Figure 2 depicts the pairs of derivative signs for the associated qualitative variables categorizing the decreasing, constant, and increasing shapes.25,28

FIG. 2.

FIG. 2.

Seven different shapes assigned to seven different types of glucose change inferred by derivative signs. Based on glucose trend and mathematical differentiation, first derivative (d1G) and second derivative (d2G) of glucose are computed at each time step n.

The maximum value of IGT corresponds to accelerating increase (shape D), and the minimum of IGT is attributed to accelerating decrease (shape B). Even though the integer values of −3, −2, −1, 0, 1, 2, and 3 are assigned, respectively, to B, F, C, G, A, E, and D as their IGT magnitude, IGT is a weighted average of different crisp qualitative variables (it is a fuzzy qualitative variable), and, thus, it may take any continuous value within the range [−3, 3] (Fig. 3b). Figure 3 demonstrates how the meal flag switches to active, pause, and inactive states (Fig. 3c) when IGT meets the corresponding thresholds (Fig. 3b). Conceptually, the activation, pause, and deactivation thresholds correspond to the start of accelerating, steady, and decelerating increase of glucose concentration, respectively.

FIG. 3.

FIG. 3.

(a) SGC after meal (b) change in SGC is translated to change of “increase of glucose trend.” Dashed-dotted, solid, and dotted lines illustrate the threshold values for increase of glucose trend variable for active, pause, and inactive states, respectively, (c) meal flag switches to active flag, pause time, and inactive flag when IGT reaches corresponding thresholds (d) estimated CHO during active flag.

The CHO content of the unannounced meals is estimated by analyzing the effects of the absorbed CHO on the subcutaneous glucose measurements. The CHO estimation uses past insulin infusion data, in addition to the SGC measurements, because insulin present in the bloodstream can mitigate the postprandial increase in glucose concentrations. The effective insulin present in the bloodstream is incorporated in the CHO estimation algorithm by filtering the past infusions by using a finite impulse response (FIR) model, which characterizes the effective insulin as a linear combination of the previous insulin doses.29 The FIR model is one representation of the insulin time action profile to capture the delay between infused subcutaneous insulin and effective insulin.

The CHO estimation algorithm determines a distributed approximation of CHO content for the unannounced meal during the active meal flag without satisfaction of the pause criteria (Fig. 3d). As such, the estimation of the unannounced meals, based on the appearance of the meal effect on the SGC measurements, is gradual and distributed.

The designed algorithm, through the use of two inputs, including the ratio of change in measured subcutaneous glucose and modeled effective insulin, determines the meal size by incremental estimation of the absorbed CHO at every sampling time (Fig. 4). The fuzzy logic approach is a powerful tool for modeling uncertain systems. The foundation of the algorithm on fuzzy logic is motivated by the approximate reasoning ability and low computation requirements of fuzzy systems.29

FIG. 4.

FIG. 4.

Carbohydrate amount is estimated with two inputs and fuzzy rules base.

The ratio of glucose increase, R(n) = Δ(n)/Δ0 at the nth sampling time is illustrated in Figure 5. A meal is detected at t = Td because the meal flag activation criterion is satisfied. At detection time (Td), the change in SGC from the previous sample (from t = Td–Δt to Td, with Δt as the sampling time) is denoted by Δ0 (vertical solid line). At every sampling time while the meal flag is active (t>Td), the change of glucose within the last 5 min (one sampling time) is computed and denoted by Δ(n) (vertical dashed line in Fig. 5).

FIG. 5.

FIG. 5.

Ratio of glucose increase, R(n) = Δ(n)/Δ0.

Figure 6 shows the actual consumed and estimated CHOs through the implementation of the algorithm for one-day clinical data including three meals and one snack. The timely detection and accurate estimation of the consumed CHOs depends on the magnitude and persistence of increase in the glucose measurements. If the rise of glucose is relatively rapid and prolonged, the absorbed CHOs may be overestimated. In contrast, a slight and gradual increase of SGC may result in underestimation. Multiple switches between active and inactive flags or satisfaction of the pause criteria during an active flag generate multi-step CHO estimations. As the temporal dynamics of the glucose measurements evolve, a new estimate for the consumed CHO is obtained along with a new insulin infusion suggestion. As such, the insulin is infused gradually at each sampling instance, if required, based on the evolving glucose dynamics.

FIG. 6.

FIG. 6.

Detection and estimation of meals/snacks for 1 day of clinical data with three meals and one snack consumed: (a) CGM data; (b) rescue, actual and estimated CHOs; (c) suggested bolus insulin.

Integration of meal detection and meal size estimation in multivariable AP system

The performance of the algorithm was previously evaluated by using the UVa/Padova simulator,25 and employing the algorithm as a component of the multivariable AP systems requires additional practical considerations of importance. These considerations arise primarily due to the difference in sampling frequency of the SGC measurements and the uncertainties of real life. The absorbed CHOs are estimated based on its effects on the glucose variations, which may vary across patients and over time within patients. For AP systems without meal announcement, the exact estimation of consumed CHOs is not as critical as the estimation of the effects of the absorbed CHOs with minimal delay and the suggestion of appropriate insulin doses for attenuating the postprandial effects.

The detection algorithm analyzes glucose variations through derivatives of the SGC measurements, which are available at every minute in the simulator. The relatively fast sampling of SGC measurements in the in silico study facilitated the use of a wavelet filter, while conceding the filtering delay (a small delay artificially induced by the wavelet filter that is inconsequential due to the relatively fast sampling frequency). In practical applications, the sampling time of 5 min for the current commercial CGM sensors amplifies the filtering delay, and consequently the detection delay, which can degrade the performance of the method in controlling postprandial glucose.

To avoid the induced delay in clinical experiments caused by the use of wavelet filters, this study computes derivatives by fitting a quadratic polynomial to the four most recent SGC measurements and differentiating the fitted polynomial function. The derivative values are then employed to define the fuzzy qualitative variables (listed in Fig. 2) that characterize the glucose trend.

Another practical consideration relates to the subject-specific parameters. In previous work,25 we specified two subject-specific parameters through the analysis of training data. Even though the reported ranges of parameters are narrow, slight changes in parameter values affect the detection rates, and consequently the magnitudes of insulin boluses and the glucose concentrations. To implement the embedded module for detecting meals and estimating the CHOs in an AP system, the patient-specific parameters are updated occasionally (every 30 min), if required.

The first subject-specific parameter is γ1 > 0, which defines the centers of the fuzzy sets for the (negative, zero, positive) sign of the first derivative. The sensitivity of the detection algorithm is controlled by using γ1, as larger values for γ1 extend the zone of zero (fuzzy) set for the first derivative and decrease the detection rate. The algorithm also adaptively changes the sensitivity of the meal detection algorithm to improve performance. For instance, if meals are detected during sleep as indicated by additional physiological variables and auxiliary AP modules, the sensitivity of the detection algorithm can be reduced by increasing γ1. To this end, an additional signal from the BodyMedia SenseWear armband Pro3 (BodyMedia, Inc., Pittsburgh, PA) provides the sleep state, thus eliminating the requirements of manual sleep announcements.30,31 Further, γ1 is decreased when severe hyperglycemia occurs, which may be attributed to either undetected or late-detected meals.

The second subject-specific parameter, β, adjusts the approximated CHO and suggested insulin dose based on detected hypo- or hyperglycemic events caused by excessive or insufficient insulin suggestions. To this end, the parameter β for scaling the outputs is either decreased or increased if the average glucose concentration over a specified period is greater than 250 mg/dL or less than 70 mg/dL.

An additional practical consideration for clinical experiments is the safety of insulin dosing. The knowledge-based safety rules, through the pause criteria, ensure that insulin infusion is limited when certain conditions are satisfied, including: (i) the glucose measurements no longer increase significantly; (ii) the SGC measurements are lower than a threshold; (iii) exercise is detected; and (iv) there is a potential for risk of hypoglycemic events. The latter two conditions are newly introduced in this work for the integrated multivariable AP system to leverage the additional information beyond CGM measurements from other embedded AP modules or devices. For instance, despite the detection of a meal, the safety criteria can moderate the insulin suggestions when exercise is detected to reduce the risk of hypoglycemia due to insulin overdosing.

The presence of a hypoglycemia alarm within the last 30 min also initiates the safety criteria. The hypoglycemia module alerts users to consume rescue CHOs,32,33 and the safety rule discontinues insulin infusion to avert the risks of low glucose levels. During the sampling instances where any of these events are detected, the safety criteria are initiated and the amount of insulin suggestion is reduced, even though the meal flag may be active, to ensure patient safety.

In regard to subject safety at night, the insulin suggestions are reduced during sleep to be more conservative and to avoid nocturnal hypoglycemia. However, the insulin suggestions are not halted during sleep as some individuals may experience the dawn phenomenon as a result of the early morning increase in glucose concentrations caused by hormones (growth hormone, cortisol, and catecholamine). As the SGC measurements may vary at night, a bolus may be required to regulate the glucose concentrations. Overall, the safety criteria are incorporated to mitigate excessive insulin dosing during critical times.

Results

Clinical data from closed-loop experiments involving subjects with T1D are used to assess the performance of the proposed meal detection and CHO estimation algorithms. The subjects, aged 18–35 years, recruited at the University of Chicago Medical Center, Kovler Diabetes Center, were involved in experiments of approximately 60 h long with the subjects' own insulin type and pump used during the experiments. The closed-loop protocol consists of the integrated multivariable adaptive AP (IMA-AP) with a generalized predictive controller that uses, in addition to the CGM signal, real-time measurements of biometric variables provided by the BodyMedia SenseWear armband and the Zephyr chest-band (Bioharness-3; Zephyr Technology, Annapolis, MD).1,32 The additional bio-signals are employed in auxiliary modules, for tasks such as hypoglycemia prediction, detection of different physiological states (such as sleep or physical activity) that affect glucose dynamics, and providing additional information for the control algorithm. The multivariable AP system does not employ feedforward meal bolusing based on manual meal announcement, and the clinical experiment data do not include any insulin boluses at meal time that are proportional to the size of the consumed meal. Regardless of the feedback controller used, the past insulin infusion does not affect the meal detection and CHO estimation methodology because the meal detection is based on the analysis of the measured glucose concentration trajectory, whereas the estimation of the consumed CHOs simultaneously considers past insulin infusions through the filtered effective insulin estimates and glucose trajectory.

A total of 117 meals and snacks consumed across 11 experiments are used to analyze the performance of the algorithm, with each experiment including between seven and nine meals and a maximum of six snacks. Meals/snacks are discriminated as CHO intake of greater/less than the 35 g threshold. The detection rates for meals and snacks are 93.5% (86/92) and 68.0% (17/25), respectively. Meals/snacks are detected if the estimated CHO within the first 2 h after the start of the meal/snack is in excess of 15 g CHO, whereas detections when no CHOs are consumed are considered false positives. The false positive rate, defined as the ratio of the number of false detections to the total of true and false detections, is 20.8% (27 false detections and 103 true detections), which equates to 1.05 false detections per day.

Figure 7 shows the detected and undetected meals and snacks for diverse CHO amounts, and it is evident from the estimated probability densities that the majority of the undetected cases occur when the actual CHO content is low. The increase in glucose from CHO consumption to detection time is on average 8.8 ± 21.3 mg/dL (in median ± mean absolute deviation [MAD] as 10.0 ± 14.4 mg/dL) for detected meals and snacks.

FIG. 7.

FIG. 7.

Average effective insulin present in the bloodstream versus the amount of consumed carbohydrates for detected and undetected meals/snacks. The probability densities are for the amount of consumed carbohydrates (x-axis) or the average effective insulin (y-axis) within the class of either detected (solid curve) or undetected (dashed curve) meals/snacks.

The marker size in Figure 7 corresponds to the change in the SGC measurements from meal consumption time to detection time (for detected meals/snacks) or over the 2-h period subsequent to the meal (for undetected meals/snacks). As many sample sizes are small relative to the reference sample size indicating zero change in the glucose measurements over the defined time, a majority of the detections occur before a substantial increase in the glucose measurements is observed, which demonstrates the capability of the approach to detect meals in a timely manner during the incipient phase of the rise in glucose concentrations.

Many of the undetected meals have a moderate (negative or small positive) change in glucose during the first 2 h of the postprandial period (indicated by the squares in Fig. 7); thus, limited effects of the consumed CHOs are observed in the glucose measurements. The average effective insulin in the bloodstream starting from the consumption time to either the detection time (for detected meals/snacks) or the following 2-h period (for undetected meals/snacks) shows that meals and snacks may be undetected if the effective insulin is high.

Detection time is defined as the time elapsed from the start of the meal to the instance when the first estimated CHO is reported by the algorithm. Meals and snacks are typically detected 34.8 ± 22.8 min (in median ± MAD as 30.0 ± 16.0 min) after CHO intake, which is a reasonable detection delay as the CHOs are gradually absorbed and affect the glucose measurements. The detection time can also be defined in relation to the weighted average of either the estimated CHOs or the suggested bolus (based on the insulin to CHO ratio). According to the latter definition, the detection of the meals and snacks is typically delayed a further 18.1 ± 12.7 min (in median ± MAD as 14.9 ± 9.7 min) beyond the detection time defined by the initial CHO estimation. The subsequent discussions consider the detection time in relation to the appearance of the first estimated CHO.

Figure 8 shows the distribution of the average effective insulin present in the bloodstream versus the change of the measured glucose within the detection time for the timely (less than 30 min) and delayed (more than 30 min) detections as well as the undetected meals/snacks. For the undetected cases, the change of glucose is computed for the 2 h after the meal/snack.

FIG. 8.

FIG. 8.

Average effective insulin present in the bloodstream versus the change of the measured glucose within the detection time for timely or delayed detections and undetected meals/snacks. The probability densities are for the change in glucose (x-axis) or the average effective insulin (y-axis) within the class of either timely detected (solid curve), late detected (dashed curve), or undetected (dotted curve) meals/snacks.

The majority of undetected meals/snacks occur when the glucose at the detection time is lower than the glucose at the start of the meal/snack. Regardless of whether the meals/snacks are detected in less than or more than 30 min, the probability densities of the change in glucose are similar, indicating that relatively similar changes in glucose are observed for both early and delayed detections. Accordingly, delayed meal detections are not necessarily associated with a greater magnitude of increase in glucose. The probability densities for the average effective insulin for timely and delayed detections show that the effective insulin is low for most detected meals, whereas some delayed detections and undetected meals typically have high effective insulin.

Figure 9 illustrates the correlation between the actual and estimated CHO for all detected meals/snacks. The estimated CHO for detected meals/snacks is defined as the accumulation of all the approximated CHO amounts determined by the algorithm within 2 h from the start of the meal/snack. Some detected meals have relatively accurate CHO estimates, whereas there are meals/snacks that are over- or underestimated because the appearance of the CHOs is subject to numerous uncertainties such as the effective insulin and the meal contents.

FIG. 9.

FIG. 9.

Estimated versus actual carbohydrates for detected meals/snacks (the solid, dashed, and dotted-dashed lines represent zero, ±25%, and ±50% estimation error, respectively).

Figure 10 illustrates the distribution of the estimation errors (defined as the actual minus estimated CHOs). The estimation errors approximately follow a Gaussian distribution (Fig. 10) centered around zero (mean/median: −1.7/−4.2 g, standard deviation/MAD: 28.1/21.2 g), demonstrating that the estimation of the unannounced meals is not biased toward either over- or underestimation. Of the detected meals/snacks, 64.1% of them have an absolute CHO estimation error less than 25 g, whereas 9.7% have an absolute CHO estimation error greater than 50 g.

FIG. 10.

FIG. 10.

Distribution of estimation errors (difference between actual and estimated carbohydrates) for detected meals/snacks.

A limited number of false positives are detected, as shown in Figure 11 with the falsely detected CHO amounts plotted versus the average change in glucose measurements over each sampling instance a false positive is detected. Among the false detections, a significant number occur when the average effective insulin is relatively low at 0.20 ± 0.12 U (median ± MAD of 0.18 ± 0.09 U) (as indicated by the color of the points). The average of the incorrectly estimated CHOs in the false positive detections is 40.6 ± 22.7 g (median ± MAD of 38.7 ± 18.1 g). These false detections are due to variations in the glucose measurements (the SGC measurement increases on average 9.7 ± 3.9 mg/dL [median ± MAD of 9.0 ± 3.9 mg/dL] per sampling instance), and the falsely detected CHO amount increases as the glucose measurements rise more substantially.

FIG. 11.

FIG. 11.

Estimated carbohydrate amounts for the false positive detections analyzed based on nominal glucose, relative change in glucose measurements, and effective insulin. The size of the points is proportional to the glucose measurement, and the color is related to the average effective insulin.

The false positive detections with high effective insulin are also typically of a low estimated CHO amount. Consequently, the incorrectly administered boluses due to the false positives do not significantly increase the effective insulin (Fig. 12), and do not pose a safety hazard. The false positive detections also do not typically occur at low SGC measurements, with the average glucose measurement at the incorrect detections at 149 ± 39 mg/dL [median ± MAD of 140 ± 27 mg/dL].

FIG. 12.

FIG. 12.

Change in distributions of effective insulin for each experiment due to incorrect boluses from false positive detections.

Some false positive detections have high effective insulin and relatively high glucose measurement, which is due to falsely detected meals typically in the later phases of the postprandial period (more than 2 h after meal consumption). The false positives in the later phases of the postprandial period typically occur due to the protracted effects of a meal as diverse CHO types are gradually absorbed and glucose measurements respond at varying time scales. As these postprandial false positives are typically preceded by accurate meal detection, the false positives are attributed to the distributed effects of the earlier detected meals that were already bolused. Overall, the false positives are typically of small CHO amounts and often at low effective insulin levels, which reduce the adverse consequences of the false detections.

Discussion

One approach for estimating the unannounced meals is to quantify the consumed CHOs in units of g CHO. Other approaches include estimating the effects of the consumed CHO on either the blood or SGCs (possibly through the estimation of parameters in insulin-glucose models). The type of estimation notwithstanding, the objective of this work is to automatically detect CHO consumption and determine the meal amount (or its effects). Therefore, the type of estimates is not as critical as timely detection and compensation of the effect of the consumed CHOs. In this work, we estimate CHO amount because it is a readily interpretable and easily understood estimate for people with diabetes.

The proposed approach employs a qualitative analysis of the glucose trends to detect meals (without manual input from users) to suggest insulin boluses. The qualitative analysis of the glucose trajectory profile does not explicitly require a dynamic mathematical model to estimate the effects of consumed CHOs (due to unannounced meals) on the future glucose trajectories. Hence, the proposed logic algorithm is more computationally efficient than predictive controllers. If an accurate dynamic model with consumed CHOs as an input is available, the estimated CHO consumption (by the proposed meal detection and CHOs estimation algorithm) can be used as an additional input to predict future glucose trajectories in a predictive control framework while recognizing the insulin sensitivity in the computation of the optimal boluses.

Alternatively, the integration of the estimated effective insulin in the bloodstream, nominal subcutaneous glucose measurements, and the estimated CHOs can be used to compute the required insulin boluses by using a logic-rule-based approach. The purpose of this work is to be computationally efficient in making bolus decisions and to compute insulin boluses for meals in a way similar to the conventional insulin injection therapy where the insulin to CHO ratio is employed to readily estimate the boluses. This rudimentary approach is used for calculating insulin boluses in this work because it is intuitive to understand.

A more sophisticated control algorithm, such as model predictive control, can be used in parallel with the proposed meal detection and associated insulin bolus suggestion algorithm. The clinical studies considered in this work involve the use of a generalized predictive controller to compensate for slight glucose deviations from the target range, whereas a meal detection and bolus suggestion algorithm is used for counteracting significant deviations caused by the more pronounced meal disturbances. In such an approach, the meal detection-based insulin bolus suggestions are used to attenuate the postprandial rise in blood glucose concentrations, whereas the predictive feedback controller can regulate the moderate deviations in glucose concentration measurements through either manipulating the basal rate or suggesting small boluses.

Another possible approach involves using the meal detection algorithm to automatically inform the controller about detected disturbances such as meals consumed, and the controller can thus use the additional information on detected meals, without requiring manual meal announcements from users, to attenuate the disturbances through appropriate insulin dosing decisions.

Regardless of the control mechanism, any feedback control method will be reactive to the postprandial rise in the glucose measurements. Therefore, feedback control will always have an inherent delay as the CHOs from unannounced meals or snacks are gradually absorbed and affect the glucose dynamics. The delay in the control algorithm can be compensated through the use of feed-forward signals that provide early information on impending disturbances such as meals and exercise. However, such feed-forward signals may require user input (for example, manual meal announcements) that can be onerous for individuals. The purpose of this work is to develop a meal detection and CHO estimation algorithm that does not require manual meal announcements from users.

In an attempt to realize an automated AP system, the proposed approach relies on the analysis of the glucose trajectory and past insulin infusion data to detect disturbances that cause a rise in the glucose measurements, such as unannounced meals, and to estimate the magnitude of the disturbances, as the amounts of consumed CHOs. Relying on the subcutaneous glucose measurements to detect CHO consumption may render some of the meals undetected as elevated levels of physical activity, high amounts of effective insulin, or other obscure phenomena can conceal or delay the effects of the meal on the glucose measurements. As the meals/snacks are only detectable if the glucose measurements increase in response to a meal, the lack of or the late detection of a meal is not of particular concern as the eluded meals are due to a decreasing trend in the glucose measurements and no insulin infusion is necessary.

Considering all intrinsic delays such as CHO absorption, CGM measurement, the detection of meal by the algorithm, insulin absorption and action, the potential for the postprandial hyperglycemia in an AP with no manual announcement is higher, as expected, when compared with APs with meal announcement where the prandial insulin is given before meals. The purpose of the algorithm is to move toward a more automated system while the potential for hyperglycemia and hypoglycemia is minimized.

The detection times and estimation errors for snacks are usually larger than meals because the effects of the smaller amounts of consumed CHO can be readily obscured by high effective insulin or physical activity. The overestimated CHO amounts are attributed to cases where two consecutive meals or snacks are consumed in close proximity, often resulting in the earlier meal being undetected whereas the latter is overestimated. A prolonged increase in glucose measurements is observed as the effects of the earlier undetected meal are propagated to the subsequent meal, which can be amplified by the insufficient amount of effective insulin available in the bloodstream due to the undetected preceding meal.

A trade-off must be negotiated between increasing detection sensitivity while mitigating false positive detections. Some of the falsely detected “meals” are observed during the later stages of sleep (early morning) when a dawn phenomenon may be presumed to be the reason for the rise in the glucose concentration measurements. In this work, the detected meals during sleep are treated with a mitigated bolus insulin dose. If the basal insulin infusion rate is modified at night, then it is possible for the insulin suggestions from the meal detection algorithm to be halted at night.

Conclusions

The proposed meal detection algorithm relies on the qualitative analysis of glucose trends, from available SGC measurements, to automatically identify the consumption of unannounced meals. The estimation of the amounts of CHOs consumed determines the size of the meals and suggests insulin boluses to attenuate the postprandial rise in glucose concentrations. Consequently, no dynamic mathematical models or manual user inputs are required in the proposed meal detection and estimation algorithm. The integration of the developed meal detection and size estimation method in the multivariable AP system is evaluated by using data from clinical experiments.

Funding Sources

This work is supported by the National Institutes of Health (NIH) under grants 1DP3DK101075-01 and 1DP3DK101077-01 and the Juvenile Diabetes Research Foundation International (JDRF) under grant 17-2013-472.

Author Disclosure Statement

No competing financial interests exist.

References

  • 1.Turksoy K, Quinn L, Littlejohn E, Cinar A: Multivariable adaptive identification and control for artificial pancreas systems. IEEE Trans Biomed Eng 2014;61:883–891 [DOI] [PubMed] [Google Scholar]
  • 2.Cinar A: Multivariable adaptive artificial pancreas system in type 1 diabetes. Curr Diab Rep 2017;17:88. [DOI] [PubMed] [Google Scholar]
  • 3.Breton M, Farret A, Bruttomesso D, et al. : Fully integrated artificial pancreas in type 1 diabetes. Diabetes 2012;61:2230–2237 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Thabit H, Hovorka R: Coming of age: the artificial pancreas for type 1 diabetes. Diabetologia 2016;59:1795–1805 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Russell SJ, El-Khatib FH, Sinha M, et al. : Outpatient glycemic control with a bionic pancreas in type 1 diabetes. N Engl J Med 2014;371:313–325 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Doyle FJ, Huyett LM, Lee JB, et al. : Closed-loop artificial pancreas systems: engineering the algorithms. Diabetes Care 2014;37:1191–1197 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Brown SA, Breton MD, Anderson S, et al. : Artificial pancreas improves glycemic control in a multi-night multicenter outpatient/home study of patients with T1D. Diabetes 2015;64:A59 [Google Scholar]
  • 8.Bequette BW: Challenges and recent progress in the development of a closed-loop artificial pancreas. Annu Rev Control 2012;36:255–266 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Harvey RA, Dassau E, Bevier WC, et al. : Clinical evaluation of an automated artificial pancreas using zone-model predictive control and health monitoring system. Diabetes Technol Ther 2014;16:348–357 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Kovatchev BP, Breton M, Dalla Man C, Cobelli C: In silico preclinical trials: a proof of concept in closed-loop control of type 1 diabetes. J Diabetes Sci Technol 2009;3:44–55 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.El-Khatib FH, Balliro C, Hillard MA, et al. : Home use of a bihormonal bionic pancreas versus insulin pump therapy in adults with type 1 diabetes: a multicentre randomised crossover trial. Lancet 2017;389:369–380 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Dassau E, Bequette BW, Buckingham BA, Doyle III FJ: detection of a meal using continuous glucose monitoring. Diabetes Care 2008;31:295–300 [DOI] [PubMed] [Google Scholar]
  • 13.Dassau E, Herrero P, Zisser H, et al. : Implications of meal library & meal detection to glycemic control of type 1 diabetes mellitus through MPC control. IFAC Proc 2008;41:4228–4233 [Google Scholar]
  • 14.Lee H, Buckingham BA, Wilson DM, Bequette BW: A closed-loop artificial pancreas using model predictive control and a sliding meal size estimator. J Diabetes Sci Technol 2009;3:1082–1090 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Lee H, Bequette BW: A closed-loop artificial pancreas based on model predictive control: human-friendly identification and automatic meal disturbance rejection. Biomed Signal Process Control 2009;4:347–354 [Google Scholar]
  • 16.Cameron F, Niemeyer G, Wilson DM, et al. : Inpatient trial of an artificial pancreas based on multiple model probabilistic predictive control with repeated large unannounced meals. Diabetes Technol Ther 2014;16:728–734 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Cameron F, Niemeyer G, Buckingham BA: Probabilistic evolving meal detection and estimation of meal total glucose appearance. J Diabetes Sci Technol 2009;3:1022–1030 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Cameron F, Niemeyer G, Bequette BW: Extended multiple model prediction with application to blood glucose regulation. J Process Control 2012;22:1422–1432 [Google Scholar]
  • 19.Cameron FM, Ly TT, Buckingham BA, et al. : Closed-loop control without meal announcement in type 1 diabetes. Diabetes Technol Ther 2017;19:527–532 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Harvey RA, Dassau E, Zisser H, et al. : Design of the glucose rate increase detector a meal detection module for the health monitoring system. J Diabetes Sci Technol 2014;8:307–320 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Turksoy K, Samadi S, Feng J, et al. : Meal detection in patients with type 1 diabetes: a new module for the multivariable adaptive artificial pancreas control system. IEEE J Biomed Heal Informatics 2016;20:47–54 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Turksoy K, Hajizadeh I, Samadi S, et al. :. Real-time insulin bolusing for unannounced meals with artificial pancreas. Control Eng Pract 2016 [Google Scholar]
  • 23.Xie J, Wang Q: A Variable state dimension approach to meal detection and meal size estimation: in silico evaluation through basal-bolus insulin therapy for type 1 diabetes. IEEE Trans Biomed Eng 2017;64:1249–1260 [DOI] [PubMed] [Google Scholar]
  • 24.Weimer J, Chen S, Peleckis A, et al. : Physiology-invariant meal detection for type 1 diabetes. Diabetes Technol Ther 2016;18:616–624 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Samadi S, Turksoy K, Hajizadeh I, et al. : Meal detection and carbohydrate estimation using continuous glucose sensor data. IEEE J Biomed Heal Informatics 2017;21:619–627 [DOI] [PubMed] [Google Scholar]
  • 26.Man CD, Micheletto F, Lv D, Breton M, et al. : The UVA/PADOVA type 1 diabetes simulator: new features. J Diabetes Sci Technol 2014;8:26–34 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Cheung JTY, Stephanopoulos G: Representation of process trends. Part I. A formal representation framework. Comput Chem Eng 1990;14:495–510 [Google Scholar]
  • 28.Bakshi BR, Stephanopoulos G: Representation of process trends-III. Multiscale extraction of trends from process data. Comput Chem Eng 1994;18:267–302 [Google Scholar]
  • 29.Wang Q, Molenaar P, Harsh S, et al. : Presonalized state-space modeling of glucose dynamics for type 1 diabetes using continuously monitored glucose, insulin dose, and meal intake. An extended Kalman filter approach. J Diabetes Sci Technol 2014;8:331–345 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Reeve MD, Pumpa KL, Ball N: Accuracy of the SenseWear Armband Mini and the BodyMedia FIT in resistance training. J Sci Med Sport 2014;17:630–634 [DOI] [PubMed] [Google Scholar]
  • 31.BaHammam A, Sharif M: Sleep estimation using BodyMedia's SenseWear armband in patients with obstructive sleep apnea. Ann Thorac Med 2013;8:53. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Turksoy K, Kilkus J, Hajizadeh I, et al. : Hypoglycemia detection and carbohydrate suggestion in an artificial pancreas. J Diabetes Sci Technol 2016;10:1236–1244 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Turksoy K, Bayrak ES, Quinn L, et al. : Hypoglycemia early alarm systems based on multivariable models. Ind Eng Chem Res 2013;52:12329–12336 [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Diabetes Technology & Therapeutics are provided here courtesy of Mary Ann Liebert, Inc.

RESOURCES