- Research
- Open Access
A fractional differential equation model for continuous glucose monitoring data
- Sasikarn Sakulrang^{1, 2}View ORCID ID profile,
- Elvin J Moore^{1, 2}Email author,
- Surattana Sungnul^{1, 2} and
- Andrea de Gaetano^{3}
https://doi.org/10.1186/s13662-017-1207-1
© The Author(s) 2017
- Received: 31 January 2017
- Accepted: 12 May 2017
- Published: 25 May 2017
Abstract
The main aim of this research was to test if fractional-order differential equation models could give better fits than integer-order 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 first-order differential equation model, a stochastic first-order differential equation model with Brownian motion, and a deterministic fractional-order model. CGM data was analyzed to find optimal values of parameters by using ordinary least squares fitting or maximum likelihood estimation using a kernel-density 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 fractional-order model giving the best fit has been estimated for each subject. Although our results show that fractional-order models can give better fits to the data than integer-order models in some cases, it is clear that the models need further improvement before they can give satisfactory fits.
Keywords
- type 1 diabetes
- CGM data
- fractional differential equation
- Brownian motion
- R programs
1 Introduction
Diabetes Mellitus, or diabetes, is a disease which occurs when there is a malfunction in the insulin-glucose system.
There are two main types of diabetes [4], type 1 and type 2. Type 1 is sometimes known as insulin-dependent diabetes. In this type, the pancreas does not produce insulin. It is thought to be an auto-immune 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 non-insulin-dependent or adult-onset diabetes. In this type, the pancreas either produces insufficient insulin with respect to the heightened demands of relatively insulin-resistant 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.
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 day-to-day 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 fractional-order 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 first-order differential equation model, (2) a stochastic first-order differential equation model, and (3) a fractional-order deterministic differential equation model. For these three models, we show that best fits are obtained from a fractional-order model with fractional orders in the range 1.5 to 2.5.
2 First-order differential equation models
2.1 Deterministic model
2.2 Stochastic model
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 first-order models
We have written R programs to test the first-order deterministic and stochastic models. We have found the following:
2.3.1 First-order deterministic model
- 1.
The fit using ordinary least-squares 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 steady-state solution of equation (1).
- 2.
This model does not give a good fit to the data.
2.3.2 First-order stochastic model
- 1.
For numerical stability, numerical solution using the Euler-Maruyama 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 Euler-Maruyama method, the solution is unstable. If the step size for stability of the Euler-Maruyama 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 first-order models do not give a good fit to the CGM data. However, they have been useful for developing R-programs and testing some of the algorithms to be used in the stochastic fractional differential equation models.
3 Fractional differential equation models
Because the first-order models do not fit the data, we look at higher-order 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 fractional-order model.
3.1 Deterministic model
3.2 Numerical solution of deterministic model
In general, it is necessary to use numerical methods to solve equation (8). We use the one-step Adams-Moulton predictor-corrector method (see, e.g., [16–18]) for numerical integration of (8).
Best least squares fits for fractional alpha model for subject 1 CGM data
Alpha value | Best parameters | Best least squares errors | ||||
---|---|---|---|---|---|---|
\(\boldsymbol{k_{GX}}\) | \(\boldsymbol{k_{XG}}\) | G (0) | \(\boldsymbol{G^{\prime}(0)}\) | \(\boldsymbol{G^{\prime\prime}(0)}\) | ||
3.0 | 9.015e − 06 | 1.106e − 06 | 6.217 | 1.993e − 02 | −2.063e − 04 | 81.86 |
2.9 | 1.536e − 05 | 1.876e − 06 | 6.37 | 1.798e − 02 | −2.039e − 04 | 78.32 |
2.75 | 3.191e − 05 | 3.862e − 06 | 6.489 | 1.575e − 02 | −2.054e − 04 | 73.442 |
2.5 | 1.008e − 04 | 1.196e − 05 | 6.881 | 9.923e − 03 | −1.811e − 04 | 69.365 |
2.25 | 2.835e − 04 | 3.344e − 05 | 7.528 | 7.161e − 04 | −1.079e − 04 | 92.639 |
2.1 | 4.156e − 04 | 5.964e − 05 | 7.902 | −8.863e − 03 | 1.09e − 04 | 151.67 |
2.05 | 1.625e − 04 | 8.396e − 05 | 7.527 | −1.137e − 02 | 5.925e − 04 | 182.74 |
2 | 7.234e − 04 | 9.178e − 05 | 7.291 | −9.791e − 03 | - | 233.68 |
1.9 | 1.057e − 03 | 1.345e − 04 | 6.703 | −6.81e − 03 | - | 320.09 |
Best least squares fits for fractional alpha model for subject 2 CGM data
Alpha value | Best parameters | Best least squares errors | ||||
---|---|---|---|---|---|---|
\(\boldsymbol{k_{GX}}\) | \(\boldsymbol{k_{XG}}\) | G (0) | \(\boldsymbol{G^{\prime}(0)}\) | \(\boldsymbol{G^{\prime\prime}(0)}\) | ||
3.0 | 1.728e − 06 | 2.367e − 07 | 11.589 | −2.6e − 02 | 1.6e − 04 | 1,401.26 |
2.9 | 2.829e − 06 | 3.96e − 07 | 11.573 | −2.492e − 02 | 1.646e − 04 | 1,371.9 |
2.75 | 5.88e − 06 | 8.587e − 07 | 11.421 | −2.2e − 02 | 1.7e − 04 | 1,325.4 |
2.5 | 1.921e − 05 | 3.146e − 06 | 11.073 | −1.67e − 02 | 1.8695e − 04 | 1,236.7 |
2.25 | 5.779e − 05 | 1.197e − 05 | 10.142 | −5.549e − 03 | 2.137e − 04 | 1,118.7 |
2.1 | 8.789e − 05 | 2.707e − 05 | 9.109 | 5.752e − 03 | 2.552e − 04 | 1,037.7 |
2.05 | 6.398e − 05 | 3.55e − 05 | 8.672 | 1.06e − 02 | 3.078e − 04 | 1,015.6 |
2.0 | 3.643e − 04 | 4.624e − 05 | 8.041 | 1.73e − 02 | - | 1,002.4 |
1.9 | 6.166e − 04 | 7.927e − 05 | 7.863 | 2.355e − 02 | - | 1,026.5 |
Best least squares fits for fractional alpha model for subject 3 CGM data
Alpha value | Best parameters | Best least squares errors | ||||
---|---|---|---|---|---|---|
\(\boldsymbol{k_{GX}}\) | \(\boldsymbol{k_{XG}}\) | G (0) | \(\boldsymbol{G^{\prime}(0)}\) | \(\boldsymbol{G^{\prime\prime}(0)}\) | ||
2.9 | 8.749e − 05 | 9.829e − 06 | 9.456 | −9.752e − 03 | 1.953e − 04 | 1,229.9 |
2.75 | 1.146e − 04 | 1.261e − 05 | 7.976 | 1.522e − 02 | −3.032e − 04 | 1,226.3 |
2.5 | 7.556e − 05 | 8.636e − 06 | 9.735 | −5.41e − 03 | 9.19e − 05 | 1,168.6 |
2.25 | 2.029e − 04 | 2.518e − 05 | 9.58 | −2.4e − 03 | 1.421e − 04 | 1,037.7 |
2.1 | 3.31e − 04 | 4.973e − 05 | 8.958 | 4.891e − 03 | 2.303e − 04 | 858.55 |
2.05 | 3.04e − 04 | 6.275e − 05 | 8.588 | 9.158e − 03 | 3.609e − 04 | 778.781 |
2.0 | 6.922e − 04 | 7.851e − 05 | 7.832 | 1.749e − 02 | - | 699.4 |
1.9 | 1.096e − 03 | 1.279e − 04 | 7.036 | 2.87e − 02 | - | 559.34 |
1.8 | 1.758e − 03 | 2.133e − 04 | 6.196 | 4.012e − 02 | - | 506.91 |
1.7 | 2.89e − 03 | 3.662e − 04 | 5.392 | 5.036e − 02 | - | 529.36 |
Best least squares fits for fractional alpha model for subject 4 CGM data
Alpha value | Best parameters | Best least squares errors | ||||
---|---|---|---|---|---|---|
\(\boldsymbol{k_{GX}}\) | \(\boldsymbol{k_{XG}}\) | G (0) | \(\boldsymbol{G^{\prime}(0)}\) | \(\boldsymbol{G^{\prime\prime}(0)}\) | ||
3.0 | 3.876e − 07 | 6.815e − 08 | 7.266 | −1.2e − 02 | 4.747e − 05 | 2,276.185 |
2.9 | 8.994e − 07 | 8.56e − 08 | 9.413 | −9.888e − 03 | 2.722e − 05 | 2,240.9 |
2.75 | 3.072e − 07 | 4.275e − 07 | 6.953 | −2.59e − 03 | −1.215e − 05 | 2,165.3 |
2.5 | 2.603e − 05 | 2.594e − 06 | 4.642 | 1.79e − 02 | −2.081e − 04 | 1,925.3 |
2.25 | 5.711e − 04 | 3.553e − 05 | 2.293 | 4.187e − 02 | −1.488e − 03 | 1,321.7 |
2.2 | 8.124e − 04 | 4.571e − 05 | 2.743 | 3.315e − 02 | −1.669e − 03 | 1,291.4 |
2.1 | 1.926e − 03 | 7.672e − 05 | 4.392 | 1.025e − 02 | −2.536e − 03 | 1,500.8 |
2.05 | 3.186e − 03 | 4.626e − 05 | 2.32 | 6.458e − 02 | −3.99e − 03 | 1,557.7 |
2.0 | 1.015e − 03 | 1.183e − 04 | 8.588 | −4.074e − 02 | - | 2,473.8 |
1.9 | 3.814e − 04 | 4.427e − 05 | 9.525 | −2.33e − 02 | - | 2,565.4 |
Best least squares fits for fractional alpha model for subject 5 CGM data
Alpha value | Best parameters | Best least squares errors | ||||
---|---|---|---|---|---|---|
\(\boldsymbol{k_{GX}}\) | \(\boldsymbol{k_{XG}}\) | G (0) | \(\boldsymbol{G^{\prime}(0)}\) | \(\boldsymbol{G^{\prime\prime}(0)}\) | ||
3.0 | 2.835e − 06 | 2.338e − 07 | 6.182 | −9.943e − 03 | 9.18e − 05 | 107.32 |
2.9 | 4.168e − 06 | 6.241e − 07 | 12.084 | −1.487e − 02 | 1.14e − 04 | 105.67 |
2.75 | 9.743e − 06 | 1.449e − 06 | 8.353 | −1.024e − 02 | 9.017e − 05 | 102.85 |
2.5 | 3.416e − 05 | 5.393e − 06 | 8.347 | −9.418e − 03 | 1.172e − 04 | 97.368 |
2.25 | 1.001e − 04 | 1.925e − 05 | 8.346 | −7.369e − 03 | 1.89e − 04 | 94.368 |
2.1 | 8.051e − 05 | 4.069e − 05 | 8.352 | −4.978e − 03 | 3.978e − 04 | 100.84 |
2.05 | 1.001e − 08 | 1e − 08 | 7.583 | −3.782e − 04 | −1.48e − 06 | 138.99 |
2.0 | 1.082e − 08 | 2.251e − 07 | 7.581 | −3.444e − 04 | - | 139.25 |
1.9 | 1.002e − 08 | 4.465e − 07 | 7.582 | −2.769e − 04 | - | 139.54 |
Best least squares fits for fractional alpha model for subject 6 CGM data
Alpha value | Best parameters | Best least squares errors | ||||
---|---|---|---|---|---|---|
\(\boldsymbol{k_{GX}}\) | \(\boldsymbol{k_{XG}}\) | G (0) | \(\boldsymbol{G^{\prime}(0)}\) | \(\boldsymbol{G^{\prime\prime}(0)}\) | ||
3.0 | 1.283e − 07 | 1e − 08 | 7.636 | 6.562e − 03 | −2.982e − 05 | 611.49 |
2.9 | 1.843e − 07 | 1e − 08 | 7.57 | 7.45e − 03 | −3.537e − 05 | 607.81 |
2.75 | 4.125e − 07 | 1e − 08 | 7.48 | 8.675e − 03 | −4.487e − 05 | 603.74 |
2.5 | 2.61e − 06 | 1e − 08 | 7.341 | 1.08e − 02 | −7.036e − 05 | 598.39 |
2.25 | 8.529e − 05 | 1.36e − 05 | 8.333 | −4.336e − 03 | 1.149e − 04 | 563.28 |
2.1 | 1.214e − 04 | 2.596e − 05 | 7.811 | −2.129e − 04 | 1.611e − 04 | 544.15 |
2.05 | 9.794e − 05 | 3.173e − 05 | 7.576 | 2.099e − 03 | 2.101e − 04 | 541.33 |
2.0 | 7.032e − 03 | 8.868e − 04 | 8.808 | −2.176e − 02 | - | 540.83 |
1.9 | 4.742e − 04 | 6.178e − 05 | 7.066 | 8.41e − 03 | - | 545.73 |
4 Discussion
The first-order deterministic and Brownian motion models do not fit the CGM data. Although the deterministic higher-order integer and fractional-order models give much better fits to the observed data than the first-order models, they also do not give satisfactory fits. One reason is that the deterministic solutions give medium-term averages for the data and cannot match the short-term 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 fractional-order 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 first-order and fractional-order 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.
Declarations
Acknowledgements
This research is supported by the Centre of Excellence in Mathematics, the Commission on Higher Education, Thailand.
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.
Authors’ Affiliations
References
- World Health Organization. http://www.who.int/mediacentre/factsheets/fs312/en/ (2016). Accessed 23 Mar 2016
- Chee, F, Fernando, T: Closed-Loop Control of Blood Glucose. Springer, Berlin (2007) MATHGoogle Scholar
- 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/continuous-glucose-monitoring (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), 712-715 (2012) View ArticleGoogle Scholar
- Rodbard, D: Continuous glucose mornitoring: a review of successes, challenges, and opportunities. Diabetes Technol. Ther. 18(suppl. 2), S3-S12 (2016) View ArticleGoogle Scholar
- Khatri, A: Automated Processing of Continuous Glucose Monitoring (CGM) Data to Study Onset of Diabetes. MSc thesis, University of Alabama at Birmingham (2015) Google Scholar
- 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) MATHGoogle Scholar
- 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) MATHGoogle Scholar
- Tomás̆, K: Fractional Differential Equations and Their Applications. Diploma thesis, Brno University of Technology (2008) Google Scholar
- Kai, DJ, Neville, JF, Alan, DF: A predictor-corrector approach for the numerical solution of fractional differential equations. Nonlinear Dyn. 29(1-4), 3-22 (2002). Special issue: Fractional Order Calculus and its Applications, Tenreiro-Machado, JA (ed.) MathSciNetMATHGoogle Scholar
- Kai, DJ, Neville, JF, Alan, DF: Detailed error analysis for fractional Adams method. Numer. Algorithms 1(36), 31-52 (2004) MathSciNetMATHGoogle Scholar
- Kai, DJ, Neville, JF, Alan, DF, Yuri, FL: Algorithms for the fractional calculus: a selection of numerical methods. Comput. Methods Appl. Mech. Eng. 194(6-8), 743-773 (2005) MathSciNetView ArticleGoogle Scholar
- Dave, A: Lévy processes: from probability to finance and quantum groups. Not. Am. Math. Soc. 51(11), 1336-1347 (2004) MATHGoogle Scholar