ISSN: 0970-938X (Print) | 0976-1683 (Electronic)

Biomedical Research

An International Journal of Medical Sciences

Research Article - Biomedical Research (2019) Volume 30, Issue 1

Long-acting insulin management for blood glucose prediction models.

Rebaz A. H. Karim1, István Vassányi1* and István Kósa2

1Medical Informatics Research and Development Center, University of Pannonia, H-8200 Veszprém, Egyetem u. 10, Hungary

2Department of Medical Rehabilitation and Physical Medicine, University of Szeged, H-6720 Szeged, Korányi fasor 8-10, Hungary

*Corresponding Author:
Istvan Vassanyi
Medical Informatics Research and Development Center
University of Pannonia, Hungary

Accepted date: December 26, 2018

DOI: 10.35841/biomedicalresearch.30-18-1190

Visit for more related articles at Biomedical Research


Currently available state-of-the-art mathematical models for blood glucose level prediction have been developed for intensive care departments, and thus they do not support long-acting or ‘basal’ insulins applied typically once a day. Our goal was to adjust the current models to support basal insulin, and thus provide a short term blood glucose prediction service applicable in outpatient care, in the form of a smartphone application. We propose a method that simulates the absorption of basal insulin as a series of smaller insulin doses according to four alternative ‘dosing profiles’, instead of using a single big dose of bolus insulin. The corrected model was tested on 18 data sets originating from a clinical trial in which 16 insulin dependent patients (7 female and 9 male) used a continuous glucose monitor device to record their blood glucose levels for six days, while their meals were recorded. The prediction errors of the corrected model were compared to the errors of the original model with the usual statistical methods and the error grid analysis. We also evaluated the night periods separately from the day-time. The proposed model correction was found to reduce the error of the prediction with respect to all investigated evaluation criteria by 0.59-1.02 mmol/l, moving the average absolute error close to the error range on the measurement devices. This reduction could bring online, continuous blood glucose prediction services closer to mass deployment in lifestyle support applications for diabetics.


Basal insulin, Blood glucose level prediction, Diabetes mellitus, Insulin absorption, Mobile lifestyle support, Outpatient care


Advances in mobile technology make it now possible to keep reliable lifestyle logs including nutrition. Such logs can be a basis for smart services like blood glucose level (BGL) prediction for millions of diabetic patients in their daily life. It has been shown that patients can benefit from mobile ambient assisted living [1] services for diabetes management [2]. One of the key factors that such prediction methods must consider, beside the meal consumption and the blood glucose history, is the subcutaneous insulin absorption. Patients with type 1 diabetes mellitus use insulin to control their BGL, and many patients with type 2 diabetes mellitus (T2DM) also need insulin treatment, in addition to using antidiabetic drugs and changing their lifestyle, in order to keep their BGL under control. According to current practice, insulin dependent diabetic patients use basal (long-acting) insulin injections once a day, to maintain a basic, continuous insulin level for the whole day (which is important especially during the night and the wake-up period), and bolus injections for every meal, to keep blood glucose levels under control following a meal.

The mathematical models commonly used for BGL prediction support the specification of short acting insulin dosing via a maximum value and the time-to-maximum value.

Though the real action of insulin is far more complex, this method is satisfactory for modeling bolus insulin correctly, but not basal insulin, making the models applicable only for inpatient care scenarios. The effect of the basal insulin is usually simulated as a single injection of bolus insulin, with a slowly rising absorption curve and a very high maximum absorption value. However, in reality, the pharmaco-dynamic profile of bolus insulin level differs fundamentally from that of long lasting insulins, the latter reaching a proper insulin level in a very short time and maintaining that level for a long time. An adjustment to the traditional model is required to properly handle basal insulin in order to reach more accurate results. Based on our previous results in this field [3], the core idea of our work is that by substituting the single big dose of insulin with a series of several smaller bolus insulin doses we can better simulate the steady curve of insulin presence in the blood similar to the curve defined by the medicine manufacturers, and thus we can decrease the error of the prediction.

Related Work

Although currently available basal insulins fail to fully imitate the physiological basal insulin secretion, their characteristic shows a gentle rise and fall compared to intermediate-acting insulins [4,5]. In order to duplicate the endogenous insulin secretion affording more flexible treatment with fewer hypoglycemia episodes. In a related study, long-acting basal insulin demonstrated great improvements in glycemic control and reduced nocturnal hypoglycemia, as well as reduced weight and lowered mealtime insulin doses [6]. Bolli et al. [7] and Chapman et al. [8] have shown in their works that glargine (GL) and detemir insulins prolong subcutaneous absorption by altering amino acid structure (GL) or adding fatty acylated side chains (Detemir). However, in [9] it was shown that there are differences in the pharmacokinetic and pharmacodynamic properties of detemir and glargine insulins.

As the problem of how insulin absorption can be modeled in BGL prediction is a complex task, many different approaches are used. In [10-13] the authors focus on short term prediction, where only the 15-30 min after a meal is considered. In such cases, however, the effect of bolus insulin is so much greater than that of basal insulin, that the latter is usually excluded from the prediction process. However, in real life, not only these short time intervals are crucial for diabetics: how their BGL fluctuates throughout the rest of the day is just as important.

Some prediction methods concern patients that require no direct insulin intake in their medications [14]. Others use only BGL history as input and exclude the effect of factors like insulin injection or meal intake [12,15,16]. Such an approach, however, assumes accurate insulin doses and nutrition in a strict daily regime, and patients whose metabolism reacts almost identically to that of “healthy” ones [17].

In our previous work [18], we implemented an outpatient blood glucose prediction model by combining two state-of-the-art models. The first one models the glucose absorption in two compartments (stomach and intestines) [19]. This model supports as input various sorts of food with different glycemic indices and it can also handle the overlap in the nutrients’ absorption between two consecutive meals. The other model is based on nonlinear discrete-delay differential equations [20], and it models the blood glucose and insulin control system. The four equations of the model describe insulin transfer between two subcutaneous insulin depot, insulin absorption into blood and the role of insulin in blood glucose level control.

For more details on the model equations, parameters and our initial results in personalizing the parameters via genetic algorithms [3].

Materials and Methods

In the new method proposed in this paper, we model the long-acting insulin in a more accurate way by using a series of smaller insulin doses, instead of one big dose, dividing the original time interval into short subintervals with low maximal absorption time.

To demonstrate the idea, the top left curve in Figure 1 represents basal insulin absorption according to information from medicine manufacturers. The top right curve shows how the model simulates a 50 unit basal insulin with 400 min maximal absorption time (Tmax) before the proposed correction. The curve at the bottom shows the correction method i.e. smaller doses with appropriate overlap can simulate the required flat curve.


Figure 1: The core idea of the proposed method: by a series of small bolus insulin doses we simulate the flat curve of basal insulin for a glycemic model that does not support basal insulin input directly.

In order to find a suitable number of sub-doses, we designed four ad-hoc ‘dosing profiles’, ranging from very few (6-7) to several (130-150) doses, and we run the tests for each of them. According to the product sheets, there are differences in duration of action, rising and falling characteristics among long-acting and intermediate-acting insulin products [21]. Table 1 shows how we modeled, in the four profiles separately, the five basal insulin products that appeared in the patient logs.

Insulin types Lantus Levemir Humulin N Insulatard Insuman basal
Original Tmax 750 420 390 300 300
1 Doses 7 6 6 6 6
Dose amount 14.3% 16.7% 16.7% 16.7% 16.7%
Tmax 100 70 65 50 50
2 Doses 20 20 20 20 20
Dose amount 5.0% 5.0% 5.0% 5.0% 5.0%
Tmax 37.5 21 19.5 15 15
3 Doses 40 40 40 40 40
Dose amount 2.5% 2.5% 2.5% 2.5% 2.5%
Tmax 18.75 10.5 9.75 7.5 7.5
4 Doses 150 130 150 150 150
Dose amount 0.7% 0.8% 0.7% 0.7% 0.7%
Tmax 0.67 0.54 0.43 0.33 0.33

Table 1: The parameter set of the four tested Insulin profiles for the five relevant basal insulin products.

Data sets

The proposed method was validated in a small scale clinical study in cooperation with the Cardiac Rehabilitation Institute of the Military Hospital, Balatonfüred, Hungary, involving insulin dependent type 2 diabetes patients on 3 w rehabilitation courses. The patients logged every meal, applied dose of insulin and every value of self-measured (fingertip) blood glucose using a fast and robust smart phone lifestyle support application [22], and they were wearing a continuous glucose monitor (CGM) device (Guardian Pro, Medtronic, Northridge, CA), which recorded a glucose level reading every five minutes [23]. The tests run between 14 January 2015 and 5 April 2015.

Clinical study

The study protocol was approved 18 October 2013 by the institutional ethical committee of the Military Hospital, Budapest, Hungary, chaired by Dr. Laszlo Kovacs, under the submission number II/20-265-2013. The protocol was designed and implemented in compliance with the World Medical Association Declaration of Helsinki on Ethical Principles for Medical Research Involving Human Subjects. The input data consisted of 18 datasets from 16 T2DM patients (7 female and 9 male), each dataset containing at least 3 d CGM records (ca. 25000 CGM records in total). Patient 4 and patient 12 had two data sets. The average age of the patients is 70 ± 8 y (mean ± standard deviation) with average weight 90 ± 18 kg. The data set contained 340 meal logs and 280 insulin injection records. In addition to the CGM values, we also had access to fingertip BGL records, measured with an ordinary fingertip blood glucose meter. The study was performed as part of a 21 d rehabilitation treatment with no stress in the patients’ everyday life and the patients were asked to refrain from excessive physical activity during the trial.


We used standard statistical methods to evaluate the improvement achieved by applying the proposed correction. We also used the Clarke Error Grid Analysis (EGA) approach to assess the clinical significance of differences between the predicted values and the blood glucose reference measurements [18,24]. This evaluation uses a Cartesian diagram, in which the predicted values are displayed on the Yaxis, whereas the actually measured values are displayed on the X-axis. Region A contains those values that fall within 20% of the measured value, so it can be considered the ‘clinically accurate’ prediction area. Regions A+B are those with acceptable point accuracy. For a graphical representation of the EGA regions (Figure 2).


Figure 2: Prediction of blood glucose level at the next meal time for a patient. Each dot represents a meal-time.

The EGA class of a prediction is a figure of merit for the practical application of a prediction tool, in contrast, the average improvement in the absolute error measures the theoretical performance of the model.


We tested the corrected model against the original setup (i.e. a large dose of single bolus insulin for a basal insulin administration) in four configurations:

• 180 min predictions, on the whole time period and night-time taken separately, for each data set

• Prediction accuracy at the next meal-time

• Wake-up BGL prediction

• EGA evaluation

Results for the 180 min predictions

We applied the original model and the corrected model to predict short term (180 min) blood glucose levels with various basal insulin profiles and computed the average absolute error of the prediction using the CGM records of the clinical study running the prediction model on all the 18 datasets.

In order to find the best profile, we first ran this test without separating the day-time from the night-time. As Table 2 shows, profile 1 with relatively few doses proved the best with respect to the improvement in the average absolute error. The original model produced 4.41 mmol/l average absolute error, while the corrected model produced 3.79 mmol/l average absolute error, thus the achieved improvement is 0.62 mmol/l.

  Profile 1 Profile 2 Profile 3 Profile 4
Average improvement (mmol/l) 0.62 0.46 0.47 0.58
Biggest improvement (mmol/l) 2.37 2.35 2.32 2.35
No. of data sets with worse results 3 4 5 3

Table 2: Average improvement, biggest improvement and worse results data for each insulin profile.

We also performed a paired t-test of the errors before correction and after correction. As Table 3 shows, the new method produced significantly better predictions except in two cases, where it still gave better prediction, but the differences were not significant.

Dataset No. of measurements p
P01 1524 <0.01
P02 1456 0.093
P03 1562 <0.01
P04.1 1724 <0.01
P04.2 1491 <0.01
P06 947 <0.01
P07 1477 <0.01
P09 1440 <0.01
P10 1534 <0.01
P11 1674 <0.01
P12.1 590 <0.01
P12.1 1589 <0.01
P14 1445 <0.05
P15 433 <0.01
P16 1444 0.11
P17 1695 <0.01
P18 1473 <0.01
P19 1487 <0.01

Table 3: Paired t-test result for prediction errors of original method and new method.

Since the night periods bear a specific significance with respect to basal insulins, we divided the 24 h of the day into two parts, the night-time from 22’00 to 5’59 the next and the day-time from 6’00 to 21’59. During the night, patients are fasting, while during day-time bolus insulin injections and meals are also present. Using profile 1, we repeated the test. For the night the average absolute error reduced from 5.01 mmol/l to 4.33 mmol/l (improvement is 0.69 mmol/l), and in day-time the average absolute error decreased from 4.13 mmol/l to 3.54 mmol/l (improvement is 0.59 mmol/l).

Prediction accuracy at the next meal-time

We also analysed the prediction accuracy at the next meal-time. A frequently used measure in the literature is the ‘ratio of acceptable error’, i.e. the ratio of predictions with an absolute error less than 3 mmol/l. We found that for 5 datasets more than 50% of the errors were within 3 mmol/l, for 11 datasets this ratio was between 30% and 50%. In two cases, it failed to achieve an acceptable result. As an example, Figure 2 shows the results of a two-day-long test for a patient with the errors at meal times.

Wake-up BGL prediction

Since there are no bolus insulin doses during the night time, we can expect a remarkable improvement in the prediction accuracy in the wake-up (fasting) BGL before the first meal and the first insulin injection. It is also an important question from the clinical point of view whether we can reliably predict the fasting BGL because it can affect the insulin administration regime. For this reason, we performed a paired t-test on the 83 morning samples of the 19 patients. The test showed that there are significant improvements in the prediction error between the original model’s prediction and the new model’s prediction (p<0.01). The difference of the average absolute error between the original and the corrected model is 1.02 mmol/l.

EGA evaluation

The EGA evaluation for all patient datasets showed that the percentage of prediction falling in the A or B (clinically acceptable) regions increased from 75% to 81% by applying the corrected model, which means a 6% improvement.


It is hard to relate our work to previous results because to our best knowledge no research has so far been published in the exact field of modeling long-acting insulin modeling in blood glucose prediction based on mathematical models.

The tests were designed to investigate all important aspects of the BGL prediction, with an emphasis on the applicability for clinical decision support. The results were quite in line with our expectations, showing an improvement in all investigated areas:

• The short-time 180 min predictions produced more improvement during the night, which can be explained by the fact that due to the missing meals and bolus insulin administration, an improved prediction of the action of the basal insulin has more effect on the overall prediction error.

• The wake-up BGL has a specific clinical importance. The application of the model correction resulted in a relatively small, but statistically significant improvement (1.02 mmol/l) in the average absolute error.

• In terms of the EGA assessment, 6% more of the predictions fall into the A or B regions. This shows that by the application of the correction, the errors were effectively translated into the “clinically safer” domains (Figure 2).

A known limitation of our approach is due to the fact that the insulin producers do not publish the exact action profile of the insulin products, the only suggestion being that the insulin has a ‘fast’ time to maximum and a nearly constant, flat top for the specified duration, usually 24 h. Thus our method that implements a perfectly flat-top plateau is just an approximation of the real action. The fact that we got the worst prediction results specifically in the case of Lantus and Levemir insulins may be due to a significant deviation of these insulins’ actual profile from the ‘ideal’ flat-top profile that we tried to approximate.

Nevertheless, our approximation can be assumed still better and closer to reality than the single-dose approach. Since the prediction errors decreased considerably and statistically significantly, we can regard the above assumption clinically proven.

A definite limitation of the proposed method stems from the mathematical model being capable to tackle only nutrition and insulin administration, but not the two influential factors of emotional, social or cognitive stress, and physical activitythough these factors are well known to have a profound and long-lasting effect on the BGL of diabetics [25]. Though our clinical setting excluded the presence of stress and physical activity from the current clinical study, in a practical application outside the rehabilitation clinic such factors must be accounted for.


In summary, the paper presented our results in the modeling of basal insulin regimes for outpatient diabetes lifestyle support. Our improvement over the traditional modeling method, combined with the expected improvement from the planned management of other factors like stress, insulin sensitivity and physical activity, could make a personalized prediction model more efficient and reliable as a module of a lifestyle support mobile application for outpatient healthcare.


We acknowledge the financial support of Széchenyi 2020 programme under the project No. EFOP-3.6.1-16-2016-00015.

Data Availability

The detailed dietary and CGMS log data used to support the findings of this study may be released upon application to the institutional Ethical Committee of the Military Hospital, which can be contacted at Magyar Honvédség Egészségügyi Központ Intézményi és Regionális Kutatásetikai Bizottság, Róbert Károly körút 44, 1134 Budapest, Hungary.