 Research
 Open Access
 Published:
A fractional differential equation model for continuous glucose monitoring data
Advances in Difference Equations volume 2017, Article number: 150 (2017)
Abstract
The main aim of this research was to test if fractionalorder differential equation models could give better fits than integerorder models to continuous glucose monitoring (CGM) data from subjects with type 1 diabetes. In this research, real continuous glucose monitoring (CGM) data was analyzed by three mathematical models, namely, a deterministic firstorder differential equation model, a stochastic firstorder differential equation model with Brownian motion, and a deterministic fractionalorder model. CGM data was analyzed to find optimal values of parameters by using ordinary least squares fitting or maximum likelihood estimation using a kerneldensity approximation. Matlab and R programs have been developed for each model to find optimal values of the parameters to fit observed data and to test the usefulness of each model. The fractionalorder model giving the best fit has been estimated for each subject. Although our results show that fractionalorder models can give better fits to the data than integerorder models in some cases, it is clear that the models need further improvement before they can give satisfactory fits.
1 Introduction
Insulin and glucagon are hormones that are produced in the pancreas and which control the level of glucose in the blood (see, e.g., [1–3]). If blood glucose is high, the pancreas secretes insulin into the bloodstream to decrease glucose level. If blood glucose is low, glucagon stimulates breakdown of glycogen and synthesis of glucose from circulating precursors to increase glucose level. A model of the insulinglucose system is shown in Figure 1.
Diabetes Mellitus, or diabetes, is a disease which occurs when there is a malfunction in the insulinglucose system.
There are two main types of diabetes [4], type 1 and type 2. Type 1 is sometimes known as insulindependent diabetes. In this type, the pancreas does not produce insulin. It is thought to be an autoimmune disease in which the immune system attacks the cells of the pancreas. Patients will need to take insulin injections throughout their life to control blood glucose level.
Type 2 is sometimes called noninsulindependent or adultonset diabetes. In this type, the pancreas either produces insufficient insulin with respect to the heightened demands of relatively insulinresistant peripheral tissues or the cells of the body do not react to insulin. This type normally occurs in older people and is more common in people who are overweight and physically inactive.
In this paper, we concentrate on type 1 diabetes. People with type 1 diabetes can wear a continuous glucose monitor (CGM) [5] as shown in Figure 2 to help them control their glucose level. However, it is also recommended that they check the accuracy of the CGM measurements with a fingerstick test (see, e.g., [6]). A CGM [5] is a device that measures blood glucose levels every 5 minutes. The glucose sensor has a tiny needle to measure glucose levels in tissue fluid, and the information is then sent to the monitoring device. If glucose levels are abnormal, it will give an alarm to the wearer. The CGM can also be combined with an insulin pump that will inject insulin if the glucose levels become too high. An example of observed CGM data for a subject with type 1 diabetes is shown in Figure 3.
A survey of the successes, challenges and opportunities of CGM has recently been given by Rodbard [7, 8] (see also Khatri [9]). Among the problems mentioned by Rodbard for CGM are the errors in CGM measurements of approximately \({\pm}10\%\) and daytoday variability in glycemic patterns of individuals. As a result of these types of problems, mathematical modeling of CGM data has proved to be very difficult. As far as the present authors are aware, there have been no satisfactory mathematical models of the changes in glucose level of people with type 1 diabetes, and there have been no previous attempts to develop fractionalorder models.
In this paper, we consider observed CGM data for six subjects and analyze the data with three different mathematical models using R and Matlab programs to find optimal values of the model parameters to fit the observed data. The three models are: (1) a deterministic firstorder differential equation model, (2) a stochastic firstorder differential equation model, and (3) a fractionalorder deterministic differential equation model. For these three models, we show that best fits are obtained from a fractionalorder model with fractional orders in the range 1.5 to 2.5.
2 Firstorder differential equation models
2.1 Deterministic model
For the purpose of this model, we consider that insulinemia (insulin in the blood) is constant.
where \(G(t)\) (mM) is a state variable of glucose concentration in the blood at time t, \(k_{XG}\) (min^{−1}) is a constant rate of glucose elimination from the blood into the external environment, represented by X. \(k_{GX}\) (mM/min) is a constant rate of glucose entering the blood from the external environment. \(G_{b}\) is basal glycemia (resting glycemia). The solution of equation (1) is as follows:
\(G^{*}\) is the steadystate solution and \(G(t_{0})=G_{b}\), where \(G_{b}\) is called the basal glucose level.
The parameters to be estimated are the basal glycemia \(G_{b}\) and the rate constants \(k_{GX}\) and \(k_{XG}\). The parameter \(\theta^{T}=[G_{b},k_{GX},k_{XG}]\) can be obtained by optimization, minimizing the ordinary least squares (OLS) loss [10].
where \(\hat{G}_{i}(\theta)=\hat{G}(t_{i},\theta)\) is obtained either from the exact solution in equation (2) or by numerical integration of equation (1), e.g., with an Euler or fourthorder RungeKutta method (RK4).
2.2 Stochastic model
We can also modify model (1) by introducing a stochastic component with fixed volatility \(\sigma_{G}\), representing on the one hand variable food intake, and on the other, variable glucose consumption due to activity, like exercise etc. We consider a Wiener process (Brownian motion) for the stochastic term.
where the parameter estimation is for \(\theta^{T}=[G_{b},k_{GX},k_{XG},\sigma_{G}]\). The stochastic term \(\sigma_{G} dW\) represents the differential of a scaled Wiener process (see, e.g., [11]).
The model can be integrated by the EulerMaruyama method [11]: let \(\{t_{0},t_{1},\ldots,t_{n}\}\) be a sequence of times at which the numerically integrated solution is desired, then
where \(\mathcal{N}(\mu,\sigma^{2})\) is the normal distribution with mean μ and standard deviation σ.
Parameter estimation can be carried out either by ordinary least squares or by Markovian maximum likelihood (MLE) [12] approximated by kernel density estimation (KDE) [13], maximizing with respect to the following quantity:
and where
as given in equation (5).
Notice that to every realization j of \(z_{i}^{j}\), there corresponds a different \(\hat{G}_{i}^{j}\), \(j=1,2,\ldots,n\).
2.3 Results of fitting firstorder models
We have written R programs to test the firstorder deterministic and stochastic models. We have found the following:
2.3.1 Firstorder deterministic model

1.
The fit using ordinary leastsquares gives a constant value for \(G(t)\) and an estimate for the ratio of parameter values \(\frac{k_{GX}}{k_{XG}}\) and not separate values for \(k_{GX}\) and \(k_{XG}\), i.e., it gives the steadystate solution of equation (1).

2.
This model does not give a good fit to the data.
2.3.2 Firstorder stochastic model

1.
For numerical stability, numerical solution using the EulerMaruyama method requires a step size that is much smaller than the time (5 minutes) between measurements in the CGM data.

2.
The choice of step size in the Brownian motion term causes problems. If the step size between CGM measurements (5 minutes) is used in the EulerMaruyama method, the solution is unstable. If the step size for stability of the EulerMaruyama method is used, then the Brownian motion term is very small.

3.
The fit using the KDE approximation method gives very small values for the variation parameter \(\sigma_{G}\) and fits close to the deterministic model.

4.
The firstorder models do not give a good fit to the CGM data. However, they have been useful for developing Rprograms and testing some of the algorithms to be used in the stochastic fractional differential equation models.
3 Fractional differential equation models
Because the firstorder models do not fit the data, we look at higherorder models. To obtain the observed periodic behavior, our aim is to consider, in general, both deterministic and stochastic models with fractional orders in the range from approximately 1.5 to 3, with the fractional order chosen by fitting the CGM data. However, in this paper we will describe and give detailed results only for the deterministic fractionalorder model.
3.1 Deterministic model
For \(\alpha \in \mathbb{R}\), we consider the deterministic fractional differential equation with the Caputo fractional derivative [14, 15],
with the initial conditions
where \(D_{t_{0}}^{\alpha}G\) is a Caputo fractional derivative of order α, \(\lfloor \alpha \rfloor\) is the maximum integer less than or equal to α, and \(G^{(k)}\) indicates the kth time derivative of \(G(t)\), \(k \in \mathbb{N}\), i.e.,
To obtain an interpretation of the Caputo differential equation that can be used to compute solutions and in order to prove that the stated initial conditions are correct, it is necessary to convert the differential equation (7) into an integral equation form. Following the methods of previous authors (see, e.g., [14, 15]), we have converted equation (7) into the Volterra integral equation (8).
where \(\Gamma(\alpha)\) is the gamma function of order α. In our calculations, we have considered values of the fractional order α in the range \(1 < \alpha \leq 3\). For \(1 < \alpha \leq 2\), the initial conditions required to uniquely specify the solution are the initial glucose level \(G_{0}^{(0)}\) and the initial value of the first derivative \(G^{(1)}(0)\). For \(2 < \alpha \leq 3\), the initial value of the second derivative \(G^{(2)}(0)\) is also required to uniquely specify the solution.
3.2 Numerical solution of deterministic model
In general, it is necessary to use numerical methods to solve equation (8). We use the onestep AdamsMoulton predictorcorrector method (see, e.g., [16–18]) for numerical integration of (8).
Let \({t_{0},t_{1},\ldots,t_{N}}\) be an equispaced partition of the desired time interval, \((t_{n}t_{n1})\equiv h = \frac{(t_{N}t_{0})}{N}\), then define the coefficients for the predictor method as
and the coefficients for the corrector method as
Note: The predictor coefficients are obtained by approximating the integral in (8) over time step \([t_{j},t_{j+1}]\) by
The corrector coefficients are obtained by using the approximation
Using the predictor coefficients in (9), we obtain the predictor formula
with \(G(t_{j})\) the numerically computed value of G at a previous time point \(t_{j}\). Using the corrector coefficients in (10), we obtain the corrector formula with the initial guess from the predictor formula of \(G(t_{n+1})= G^{P}(t_{n+1})\) in the form
We used least squares to find the best fits for a range of values of the fractional order α in the range 1.5 to 2 for the parameters \(k_{GX}\), \(k_{XG}\), \(G(0)\), \(G^{\prime}(0)\) and for the range \(2 < \alpha \leq 3\) for the parameters \(k_{GX}\), \(k_{XG}\), \(G(0)\), \(G^{\prime}(0)\) and \(G^{\prime\prime}(0)\). The results for each subject are shown in Tables 16. Plots showing the best fit for each subject are shown in Figures 46.
4 Discussion
The firstorder deterministic and Brownian motion models do not fit the CGM data. Although the deterministic higherorder integer and fractionalorder models give much better fits to the observed data than the firstorder models, they also do not give satisfactory fits. One reason is that the deterministic solutions give mediumterm averages for the data and cannot match the shortterm spikes and falls in the measured data.
For physiologic plausibility, the rate of movement of glucose from the blood into the environment should be in the range 0.01 to 0.05 min^{−1}. In the deterministic models, the parameter \(k_{XG}\) is associated with movement from the blood into the environment. As an approximation, time scales for the fractionalorder equations suggest that the conversion from the model variable t to real time can be modeled by using \((k_{XG})^{1/\alpha}\) as a rate of movement of glucose from the blood giving values in the range 0.007 to 0.02 min^{−1} which appear reasonable.
In order to model effects such as eating a meal or physical activity, which can occur at random times, we will introduce stochastic terms into the model. From preliminary calculations with firstorder and fractionalorder stochastic fits, we find that if a Wiener (Brownian motion) term is used for the stochastic term, then the KDE approximation method gives variances \(\sigma_{G}\) that are very small and fits that are close to the deterministic model fits.
If, after further investigation, we find that Wiener processes are not satisfactory, we might consider Lévy jump processes (see, e.g., [19]) because these processes are designed to model larger external shocks than Wiener processes. The model we have considered in this paper does not include deterministic changes in glucose levels resulting from eating a meal or exercise or from a large injection of insulin. Inclusion of these changes should greatly improve future models.
References
World Health Organization. http://www.who.int/mediacentre/factsheets/fs312/en/ (2016). Accessed 23 Mar 2016
Chee, F, Fernando, T: ClosedLoop Control of Blood Glucose. Springer, Berlin (2007)
American Diabetes Association. http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2845057/ (2016). Accessed 5 Apr 2016
Medical News Today. http://www.medicalnewstoday.com/info/diabetes/ (2016). Accessed 25 Mar 2016
Medtronic. http://www.medtronicdiabetes.com/products/continuousglucosemonitoring (2016). Accessed 23 Mar 2016
Sentry Health Monitors. http://www.lifeclinic.com/focus/diabetes/finger.asp (2016). Accessed 5 Apr 2016
Rodbard, D: The challenges of measuring glycemic variability. J. Diabetes Sci. Technol. 6(3), 712715 (2012)
Rodbard, D: Continuous glucose mornitoring: a review of successes, challenges, and opportunities. Diabetes Technol. Ther. 18(suppl. 2), S3S12 (2016)
Khatri, A: Automated Processing of Continuous Glucose Monitoring (CGM) Data to Study Onset of Diabetes. MSc thesis, University of Alabama at Birmingham (2015)
Wolfram Math World. http://mathworld.wolfram.com/LeastSquaresFitting.html (2016). Accessed 18 Apr 2016
Peter, EK, Eckhard, P, Henri, S: Numerical Solution of SDE Through Computer Experiments. Springer, Berlin (1994)
PennState Eberly College of Science. https://onlinecourses.science.psu.edu/stat414/node/191 (2016). Accessed 1 Apr 2016
Wikipedia. https://en.wikipedia.org/wiki/Kernel_density_estimation (2016). Accessed 1 Apr 2016
Shantanu, D: Functional Fractional Calculus for System Identification and Control. Springer, Berlin (2008)
Tomás̆, K: Fractional Differential Equations and Their Applications. Diploma thesis, Brno University of Technology (2008)
Kai, DJ, Neville, JF, Alan, DF: A predictorcorrector approach for the numerical solution of fractional differential equations. Nonlinear Dyn. 29(14), 322 (2002). Special issue: Fractional Order Calculus and its Applications, TenreiroMachado, JA (ed.)
Kai, DJ, Neville, JF, Alan, DF: Detailed error analysis for fractional Adams method. Numer. Algorithms 1(36), 3152 (2004)
Kai, DJ, Neville, JF, Alan, DF, Yuri, FL: Algorithms for the fractional calculus: a selection of numerical methods. Comput. Methods Appl. Mech. Eng. 194(68), 743773 (2005)
Dave, A: Lévy processes: from probability to finance and quantum groups. Not. Am. Math. Soc. 51(11), 13361347 (2004)
Acknowledgements
This research is supported by the Centre of Excellence in Mathematics, the Commission on Higher Education, Thailand.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors’ contributions
All authors contributed equally to the writing of this paper. All authors read and approved the final manuscript.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Sakulrang, S., Moore, E.J., Sungnul, S. et al. A fractional differential equation model for continuous glucose monitoring data. Adv Differ Equ 2017, 150 (2017). https://doi.org/10.1186/s1366201712071
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s1366201712071
Keywords
 type 1 diabetes
 CGM data
 fractional differential equation
 Brownian motion
 R programs