Method

This page provides technical details and references.

Disclaimer: The information provided on this website are provided for general information only. They are not intended to provide personal medical advice nor to derive individual treatment strategies from them. In case of any questions regarding your personal medical care, please consult your physician.

Technical realization

The simulator was implemented entirely in JavaScript, which is interpreted by all modern browsers. This means that all calculations can be performed directly on the user’s device. Data or parameters entered can be downloaded if desired, but are never automatically saved outside the browser.

Numerical simulation

For the numerical solution of the differential equation system, a classical Runge-Kutta method with a fixed step size of 1min is used. This ensures a good compromise between short simulation time and high accuracy. Furthermore, the fixed step size facilitates the consideration of impulsive signals such as the sudden increase of the insulin concentration due to a bolus.

Used tools and libraries

The graphical visualization of the simulation results is carried out with Chart.js. Webpack is used to bundle the JavaScript packages and as a local server, and Vue.js as the framework.

AID algorithms

Currently, two algorithms are included in the simulator; the selection will be expanded in the future.

Basal rate + Bolus

The “Basal+Bolus” setting realizes a common intensified insulin therapy by means of basal rate and meal bolus. When changes are made to the virtual patient, the basal rate is automatically set to a physiological value, but can be manually overwritten. The meal bolus is delivered for announced meals with an adjustable timespan between injection and meal; the carb factor (in units of insulin per unit of carbohydrate, i.e. 10g) is also configurable.

OpenAPS (oref0)

OpenAPS (oref0) is the open source algorithm developed and maintained by the Do-It-Yourself (DIY) community. It is included unchanged and in its original form because it is also programmed in JavaScript.

Manual delivery of a meal bolus by the virtual patient is configured exactly as above; basal rate adjustment, however, is done automatically by the algorithm. Various parameters can be adapted, including insulin sensitivity (ISF), target range of glucose concentration, duration of insulin activity (DIA) and others. For more details on their meaning and effect in the algorithm, please refer to the OpenAPS documentation.

Meals

For the simulation, any number of meals can be defined, which are taken at a specific time and consist of an adjustable amount of carbohydrates. Meals can be announced or unannounced.

In the expert mode, especially the announcement can be parameterized even more filigree: On the one hand, the announced time of the meal can deviate from the actual time as desired; the same applies to the amount of carbohydrates. In addition, the exact time at which the announcement is made can be set; for example, it is possible to specify how much advance notice the AID algorithm has of an upcoming meal.

Physiological model

For the mathematical description of the physiological processes in the body of the virtual patient, we currently offer two options: The model described by Dalla Man et al. in [3, 4], whose equations are also the basis of the UVA/PADOVA Type 1 Diabetes Simulator (T1DMS). And the model by Hovorka et al. [5], following implementational details from [6].

Our current implementation of the UVA/Padova model deviates from the original model in some details:

  • For the digestion rate (kempt), different models are described in [3,4]. For simplicity, an average of maximum and minimum digestion rates was provisionally used instead of the complex calculation rules.
  • Hepatic gluconeogenesis ([3], Eq. (4)) was limited to avoid singularity ([3], Eq. (5)) at high insulin concentrations.
  • Subcutaneous insulin kinetics included in T1DMS [4] are not described in [3]; they were taken from [2], including the associated parameters.

The default values of the parameters are taken from the “Normal Value” column in [3, Table 1] and describe the behavior of a healthy person.

The following scheme visualizes the state variables included in the model and the interactions between them:

Qsto1
Qsto1
Qsto2
Qsto2
kgri
meal
meal
Qgut
Qgut
kempt
Ra
Ra
kabs
I_
I_
XL
XL
ki
EGP
EGP
kp3
I
I
X
X
p2u
Uid
Uid
Vmx
Gp
Gp
Gt
Gt
kabsk2k1
Ip
Ip
Il
Il
RaI
RaI
Isc1
Isc1
Isc2
Isc2
kd
IIR
IIR
ka2ka1
G
G
kabsVm0kp2kp1
E
E
Uii
Uii
explanation
explanation
Viewer does not support full SVG 1.1

It must be expressly pointed out that this is only a mathematical model which can at most describe the real processes in the human body approximately and in parts. Therefore, although the simulation results qualitatively resemble clinical curves, they must be interpreted with caution and are not suitable for deriving individual treatment strategies from them (see disclaimer). We do not assume any responsibility for the correctness of the results or damages of any kind resulting from the use of the simulator (see license).

Scientific References

[1] Dalla Man, Ch.; Camilleri, M.; Cobelli, C.: A System Model of Oral Glucose Absorption: Validation on Gold Standard Data. IEEE Transactions on Biomedical Engineering, Volume 53, Number 12, December 2006

[2] Dalla Man, Ch.; Raimondo, D.M.; Rizza, R. A.; Cobelli, C.: GIM, Simulation Software of Meal Glucose-Insulin Model. Journal of Diabetes Science and Technology, Volume 1, Issue 3, May 2007

[3] Dalla Man, C.; Rizza, R. A.; Cobelli, C.: Meal simulation model of the glucose-insulin system. IEEE Transactions on biomedical engineering, 54(10), 2007.

[4] Dalla Man, C.; Micheletto, F.; Lv, D.; Breton, M.; Kovatchev, B.; Cobelli, C.: The UVA/PADOVA Type 1 Diabetes Simulator: New Features. Journal of Diabetes Science and Technology, Volume 8, Issue 1, 2014.

[5] Hovorka, R.; Canonico, V.; Chassin, L. J.; Haueter, U.; Massi-Benedetti, M.; Federici, M. O.; Pieber, T. R.; Schaller, H. C., Schaupp, L.; Vering, T.; Wilinska, M. E.: Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Journal of Phyiological Measurement, Volume 25, 2004.

[6] Andersen, S. H.: Software for in Silico Testing of an Artificial Pancreas. Master’s Thesis at Technical University of Denmark. 2014.