Abstract
Background:
In automated glucose clamp experiments, blood glucose (BG) concentrations are kept close to a predefined target level using variable glucose infusion rates (GIRs) determined by implemented algorithms. Clamp quality (ie, the ability to keep BG close to target) highly depends on the quality of these algorithms. We developed a new Clamp algorithm based on the proportional-integral-derivative (PID) approach and compared clamp quality between this and the established Biostator (BS) algorithm.
Methods:
In numerical simulations, the PID-based algorithm was optimized in silico. The optimized Clamp-PID algorithm was tested in in vitro experiments and finally validated in vivo in a small (n = 5) clinical study.
Results:
In silico, in vitro, and in vivo experiments showed better clamp quality for the new Clamp-PID algorithm compared with the BS algorithm: precision and absolute control deviation (ACD) decreased from 3.7% to 1.1% and from 2.9 mg/dL to 0.6 mg/dL, respectively, in the numerical simulation. The in vitro validation demonstrated reductions in precision (from 3.3% ± 0.1% (mean ± SD) to 1.4% ± 0.4%) and in ACD (from 2.3 mg/dL ± 0.4 mg/dL to 0.8 mg/dL ± 0.2 mg/dL), respectively. In the clinical study, precision and ACD improved from 6.5% ± 1.3% to 4.0% ± 1.1% and from 3.6 mg/dL ± 0.9 mg/dL to 2.2 mg/dl ± 0.6 mg/dl, respectively. The quality parameter utility did not change.
Conclusions:
The new Clamp-PID algorithm improves the clamp quality parameters precision and ACD versus the BS algorithm.
Introduction
The pharmacokinetic and pharmacodynamic effects of anti-diabetic drugs are usually characterized by glucose clamps in which blood glucose (BG) is kept as closely as possible at a predefined target level by means of variable glucose infusion rates (GIRs). GIR profiles reflect the metabolic effects of the drug under investigation over time. 1 In automated glucose clamps, GIR is calculated automatically by a pre-programmed algorithm. The first automated glucose clamp device was the Biostator, developed in the early 1970s by Life Sciences Instruments, Elkhart, IN, USA. 2 Although the device was used in thousands of glucose clamp experiments, the algorithm for the calculation of GIR has some limitations: The Biostator (BS) algorithm was designed in the 1970s when fast- and ultra-fast-acting insulin analogues were not yet available. Due to the absence of any need for a fast reaction, the algorithm reacts too slow to compensate for the fast onset of action of these modern insulins leading to an initial substantial drop in BG, which later is compensated by an “overshoot” of BG above target level. An in vitro experiment illustrating the typical course of BG values when using the BS algorithm to investigate fast-acting prandial insulins is shown in Figure 1. Furthermore, the BS algorithm does not separate the proportional and the derivative part of the control algorithm, so that crossover effects between both parts of the controller can occur. 3 This makes it difficult to just optimize the BS algorithm to the fast action of modern prandial insulins.

Resulting mean BG and GIR curves of automated in vitro glucose clamps using the ClampArt device running the Clamp-PID algorithm (blue) and the BS algorithm (red), respectively. Both BG curves were generated by the same insulin profile (shown in Figure 2), the same tubing set, and the same sensor. Abbreviations: BG, blood glucose; GIR, glucose infusion rate.

Pump rate profile used to dilute glucose concentration in the 5L container in the in vitro experiment to mimic insulin action.
We, therefore, decided to develop a new Clamp algorithm optimized for rapid-acting insulins given as a subcutaneous bolus based on a proportional-integral-derivative (PID) controller approach. For evaluation, we compared the impact of the new Clamp-PID and the BS algorithm on established clamp quality parameters. 4
Methods
The development of the new Clamp-PID algorithm was performed in four steps: (i) selection of the type of controller for the new algorithm and identification of the best tuning parameters, (ii) in silico optimization of the algorithm to further improve the precision of BG control, (iii) in vitro verification of the results, and (iv) clinical validation of the new Clamp-PID algorithm.
Selection of Controller Type
We started with the classical PID approach for the algorithm. The PID controller is a control loop mechanism employing feedback that has been widely used in technical control systems including closed-loop systems for the delivery of insulin.5-7 A PID controller consists of three parts: The proportional part (p-term, fp) is proportional to the difference of target level and the measured value; the integral part (i-term, fi) accounts for past deviations from target level and integrates them over time, whereas the derivative part (d-term, fd) uses the actual rate of change to have a best estimate of the future trend. The balance between the three different effects is achieved by tuning the optimal control function using the tuning constants kp, ki, and kd. The very simple PID approach for calculating glucose infusion rates GIR = kp * fp + ki * fi + kd * fd then translates into
In contrast to conventional PID controllers, the integral term is different in the Clamp-PID algorithm. The integral term used in PID controllers is the integral of prior deviations from target. At steady state, the values are at target (proportional part equals zero) and stable (no slope, ie, derivative part equals zero) and therefore the integral part also equals zero. But for glucose clamps, following a bolus of insulin, the resulting GIR is always positive and never zero, as long as there is any remaining insulin action (as indicated in the insulin time-action profile in Figure 2). We therefore modified the classical PID controller by using the last mean GIR (integral of the last GIRs) to account for the GIR needed to keep BG at target level in case of BG values at target and a BG slope of zero (Clamp-PID algorithm).
The three unknown tuning parameters can be determined in numerical simulations by choosing a set of tuning parameters that result in the best BG precision in a simulated glucose clamp. To achieve stable control, the algorithm needs negative feedback, that is, a decreased GIR when BG values are rising and vice versa. Therefore, the parameter kd needs to be negative.
Numerical Optimization
For the optimization of the tuning parameters, a numerical glucose clamp simulator mimicking a subcutaneous insulin bolus with an exponential absorption of the insulin from the subcutaneous tissue and an exponential elimination with a lower time constant was used. 3 The BG-lowering effect of insulin was simulated using a log-normal insulin action profile, 8 whereas the Clamp-PID algorithm was used for GIR calculation to increase BG. In order to get a realistic simulation, some sensor noise was added to the BG values by using normally distributed random values with a standard deviation (SD) of 0.3 mg/dL reflecting the measurement error of the glucose sensor in the ClampArt device.
Different tuning parameters for all three parts of the algorithm were systematically investigated in several thousand glucose clamp simulations and precision of the BG curves were calculated for each set of parameters. The set of tuning parameters with the best precision was considered as the best parameters for the Clamp-PID algorithm and used for the in vitro experiments.
In Vitro Verification
For the in vitro verification, the ClampArt device using either the new Clamp-PID algorithm or the BS algorithm was connected with the original tubing set to a 5L container filled with glucose solution. To mimic BG-sensing glucose solution was pumped from the container to the build-in sensor and a standard infusion set was used to “infuse” 20% glucose into the same container using the connected glucose infusion pump. The glucose-lowering effect of the simulated insulin was realized by diluting the glucose solution in the container with water infused at variable rates by a computer-controlled external pump. With both algorithms, real-time in vitro glucose clamps were performed and clamp quality parameters precision and absolute control deviation (ACD) were compared. To check the robustness of the algorithms, they were stressed in several ways, for example, by changing the target level, stopping the calculation of new GIRs for some time, and administering a simulated insulin bolus.
Clinical Validation
Finally, the Clamp-PID algorithm was validated in a small clinical pilot study comparing Clamp-PID versus BS algorithm in five healthy male volunteers who received 0.3 U/kg of fast-acting insulin aspart (NovoRapid, Novo Nordisk, Bagsvaerd, Denmark) under euglycemic glucose clamp conditions on two study days. Participants were 43.6 ± 8.9 (mean ± SD) years old and had a body mass index (BMI) of 24.3 ± 1.2 kg/m2. (Table 1) The ClampArt device was used on both days running the Clamp-PID algorithm or the BS algorithm in random order. Pharmacodynamics were assessed for up to 12 hours after dosing. Reference and safety BG values (SuperGL, Dr. Müller Gerätebau, Freital, Germany) were obtained every 15 minutes. The BG target level was set to 81 mg/dL (4.5 mmol/L). The clinical study was conducted according to the International Conference on Harmonisation (ICH) from August to September 2018 and was approved by the Ethics Committee (Ethics Committee of the Medical Association North-Rhine, Düsseldorf, Germany) and the national competent authority (Bundesinstitut für Arzneimittel und Medizinprodukte [BfArM], Bonn, Germany). All participants provided written informed consent prior to any study related activities.
Subject Demographics of the Clinical Pilot Study Using BS Algorithm and Clamp-PID Algorithm.
Note. Data are mean ± SD.
Abbreviations: BMI, body mass index; BS, Biostator; PID, proportional-integral-derivative.
Statistical Analysis
Within each clamp experiment, all BG data including all outliers were analyzed. The coefficient of variation (CV) of the BG values (precision) was calculated using all BG values where the actual algorithm was active, that is, all BG values with corresponding no-zero GIRs. Additionally, the clamp quality parameters ACD, that is, the mean absolute difference of BG from the target level, and utility (time with the device being operational) between both algorithms were compared. 4 The two data sets were compared with a two-sided paired t-test with a significance level of α < 0.05.
Results
Figure 3 shows the results of 3200 simulations of glucose clamps using the Clamp-PID algorithm with different tuning parameters ki and kp. Each simulation was done thrice with different mean and normally distributed errors for the simulated glucose sensor per run: (A) 0.0 mg/dL, (B) 0.3 mg/dL, and (C) 0.6 mg/dL. Forty different values for kp and 80 different values for ki were systematically tested. The resulting values for precision of the simulated clamps are shown in Figure 3. Results were color-coded: the red area shows combinations of the tuning parameters resulting in glucose clamps with unacceptable poor quality. The light blue area represents combinations of parameters resulting in simulated excellent precisions between 1% and 2%. Unsurprisingly, the best results were obtained with the best simulated sensor, that is, a sensor with no error shown in Figure 3(A) with the largest light blue area. Figure 3(B) shows the results for BG precisions for automated glucose clamps using a simulated sensor with a normally distributed random error with an SD of 0.3 mg/dL, which reflects the measurement error of the glucose sensor used for the subsequent in vitro validation. The light blue area with precisions between 1% and 2% is smaller, as in Figure 3(A), where an ideal sensor is used but still large enough to pick combinations of the tuning parameters ki and kp resulting in excellent precision. If the simulated quality of the glucose sensor deteriorates to 0.6 mg/dL, a simulated overall precision of the glucose clamp below 2% can only be found at a few isolated spots. Nevertheless, the best combination of the tuning parameters in the other settings also gets the best results with the poorer sensor, although the overall precision deteriorates with declining sensor quality.

Results of numerical simulations of euglycemic glucose clamps using a Clamp-PID controller with different tuning parameters ki and kp. The clamp quality parameter precision is color-coded. The normally distributed random error for the glucose sensor is (A) 0.0 mg/dL, (B) 0.3 mg/dL, and (C) 0.6 mg/dL. Abbreviations: PID, proportional-integral-derivative.
The simulations shown in Figure 3 were performed with a fixed tuning parameter kd. To find the best set of all three tuning parameters, the shown figure had to be recalculated for different sets of kd and the best overall precision had to be determined. Figure 3 shows the global minimum of the BG precision with the optimal value of kd and different values for ki and kp.
The best set of all three tuning parameters improved precision in the numerical simulations from 3.7% (BS algorithm) to 1.1% and ACD from 2.9 mg/dL to 0.6 mg/dL (Table 2).
Clamp Quality Parameters Obtained From In Silico, In Vitro, and In Vivo Experiments Using Either BS or Clamp-PID Algorithm.
Note. Data are mean ± SD.
Abbreviations: ACD, absolute control deviation; BS, Biostator; PID, proportional-integral-derivative.
This set of tuning parameters was used in an in vitro validation comparing the Clamp-PID- with the BS algorithm. The BG and GIR curves of an automated glucose clamp with the Clamp-PID algorithm and this set of optimal tuning parameters and with the BS algorithm are shown in Figure 1.
The BS algorithm led to a larger drop at the beginning of the glucose clamp around 40 minutes after dosing where the increase in insulin effect was highest (Figure 1). At this time, the BG values were about 8% below target level with the BS algorithm, but only 4% with the Clamp-PID algorithm (Table 2). After the maximum insulin action at 100 minutes, post-dosing BG values were exactly at target level with the Clamp-PID algorithm (with a deviation of ± 1 mg/dL due to the simulated error of the sensor), whereas with the BS algorithm BG was constantly about 3 mg/dL above target level until about 250 minutes after dosing. Thereafter, BG values oscillated around target level with both algorithms, but the amplitude was larger with the BS algorithm.
Both algorithms were tested in in vitro experiments and clamp quality parameters were calculated. Precision with this set-up with a real sensor and the original tubing of an automated glucose clamp were comparable to the precision in the in silico tests (3.7% vs 3.3% for the BS algorithm and 1.1% vs 1.4% for the Clamp-PID algorithm) as were the ACDs (2.9 mg/dL vs 2.3 mg/dL for the BS algorithm and 0.6 mg/dL vs 0.8 mg/dL for the Clamp-PID algorithm). The in vitro validation showed a reduction in precision from 3.3% ± 0.1% (mean ± SD) to 1.4% ± 0.4% and a decrease in ACD from 2.3 mg/dL ± 0.4 mg/dL to 0.8 mg/dL ± 0.2 mg/dL with the Clamp-PID versus the BS algorithm (Table 2). Improved clamp quality was due to a shorter time back to target level after an initial undershoot due to the rapid insulin action and smaller oscillations thereafter with the Clamp-PID algorithm.
Figure 4 shows the resulting BG and GIR curves of the clinical validation in five healthy subjects. BG and GIR curves showing raw mean values of all five automated euglycemic glucose clamp experiments using the ClampArt device running the Clamp-PID algorithm (blue) and the BS algorithm (red), respectively, without any further smoothing or outlier detection. Additionally, smoothed GIR data are shown using Loess technique with a smoothing parameter of 0.15. As a result of the faster reacting Clamp-PID algorithm, a clear left shift in early phase of the GIR curve with respect to the GIR curve obtained with the BG algorithm can be observed. The clinical validation showed lower clamp quality than that obtained in simulations and in vitro experiments for both algorithms reflecting the difference of an undisturbed laboratory environment and a clinic. Nevertheless, differences between the two algorithms were similar with a higher precision (by about 40%) with the Clamp-PID algorithm and the BS algorithm: mean precision 6.5% ± 1.3% with the BS algorithm compared with 4.0% ± 1.1% with the Clamp-PID algorithm (P = .0071).

Resulting BG and GIR curves of automated euglycemic glucose clamp clinical study using the ClampArt device running the Clamp-PID algorithm (blue) and the BS algorithm (red), respectively. BG and GIR curves showing raw mean values of n = 5 clamp experiments without any further smoothing or outlier detection. Additionally, smoothed GIR data are shown using Loess technique with a smoothing parameter of 0.15. Abbreviations: BG, blood glucose; BS, Biostator; GIR, glucose infusion rate; PID, proportional-integral-derivative.
Likewise, ACD improved from 3.6 mg/dL ± 0.9 mg/dL (BS algorithm) to 2.2 mg/dL ± 0.6 mg/dL with the Clamp-PID algorithm (P = .0015).
Utility was almost identical with both algorithms: 94.1% ± 3.9% with the BS algorithm and 94.2% ± 4.7% with the Clamp-PID algorithm (P = .94) (Table 2).
Discussion
The euglycemic glucose clamp is the gold standard to assess the pharmacodynamic effects of BG-lowering agents and insulin administration routes as well as insulin sensitivity. 9 In order to obtain accurate and reproducible results, it is important to achieve high glucose clamp quality. 1 For automated glucose clamps, the performance of the implemented algorithm for the calculation of GIR is key to keep the BG as close as possible to the predefined target level producing BG curves with low variations, that is, achieving high clamp quality.
Our data indicate that the BS algorithm does not achieve high clamp quality with modern prandial insulins as it reacts too slowly to their fast onset of action with rapid changes in insulin action shortly after injection. This is unsurprising as the BS algorithm was developed in the 1970s when fast- and ultra-fast-acting insulin analogues were not yet available. Therefore, the algorithm was designed for moderate changes of BG measurements. Indeed, when changes in insulin action became more moderate around maximal effect of the modern prandial insulins studied, the BS algorithm was able to bring back BG values back to target.
We therefore developed a new Clamp-PID algorithm with the aim to avoid large BG declines with fast-acting insulins after onset of action. Numerical simulations were used to select optimal tuning parameters for the algorithm. In these simulations, precision improved by more than threefold versus the BS algorithm mainly through a substantial reduction of the initial BG drop at the fast onset of insulin action. The calculated precision of 1.1% achieved with the Clamp-PID algorithm shows excellent clamp quality, in particular in view of an almost five-fold reduction of the ACD, which directly describes the difference between BG values and target level.
The in vitro verification confirmed the excellent clamp quality of the Clamp-PID algorithm: precision improved more than twofold and dropped to 1.4% and ACD was 0.8 mg/dL, an almost threefold improvement versus the BS algorithm. Again, the main difference between the two algorithms was the smaller undershoot and the faster return to target level with the Clamp-PID algorithm.
The small clinical study confirmed the in vitro and in silico results, even though both precision and control deviation were higher in the clinical study than in the ideal environment of a lab or in numerical simulations as additional confounders such as blood clotting, movement of the subjects’ arm, impaired blood flow, and so on, impair clamp quality. Nevertheless, precision was improved in each of the paired glucose clamp experiments, and mean precision was reduced by almost 40% as was ACD. Statistically, both improvements were significant, but with the small number of subjects the significance testing has its limitations and should not be overrated. Noteworthy, the BS algorithm showed a mean precision of 6.5% exceeding the threshold of 5% that was set for clamps with “sufficient quality.” 10 In contrast, the new Clamp-PID algorithm was well below this threshold. No adverse events or serious adverse events occurred in this study, which leads to the conclusion that the new Clamp-PID algorithm is safe and effective.
Overall, the improvements in precision and ACD seen with the Clamp-PID algorithm should lead to better clamp quality in automated glucose clamps for currently available fast- and ultra-fast-acting insulin analogues. Achieving high clamp quality is of huge importance, as large deviations of actual BG from the clamp target level indicates that a “wrong” GIR was chosen and GIRs are the primary outcome of pharmacodynamic glucose clamp studies. Thus, only GIR curves derived from glucose clamps with high clamp quality truly reflect the BG-lowering effect of the investigated insulin, whereas GIR in low-quality clamps could report pharmacodynamic parameters potentially falsifying clamp-derived comparisons between different insulin formulations. Therefore, a high glucose clamp quality is key to precisely and reproducible describe the time-action profiles of BG-lowering agents.
The strength of this study is the threefold approach by in silico development, in vitro verification, and clinical validation of the new Clamp-PID algorithm. All outcomes were consistent and confirmed that the new Clamp-PID algorithm is safe and effective for clamps with fast-acting insulins.
One limitation is the small sample size of the clinical study; however, since each of the paired glucose clamp experiments with either algorithm showed the advantage of the Clamp-PID algorithm, we decided that this small number of subjects is sufficient to confirm the findings from in silico and in vitro experiments. Another limitation is the investigation of healthy subjects only. However, our experience of thousands of automated glucose clamps using the BS algorithm shows that the same algorithm can be successfully used for healthy subjects and for people with diabetes. In fact, the pharmacodynamic profiles of short-acting insulins are often investigated in healthy subjects, and this is accepted by regulators. 9 While the total GIR-response differs because of different degrees of insulin sensitivity across populations, there is little difference in the shape of the pharmacodynamic profiles of short-acting insulins between healthy subjects and people with type 1 or type 2 diabetes as has recently been shown for insulin lispro and ultra-rapid insulin lispro. 11 Because the algorithm just reacts on the measured BG values and the desired target level independent of the underlying physiology, healthy subjects are an appropriate and safe population. Additional limitations of our study include the open (unblinded) data analysis, which could potentially introduce some bias. However, the study nurses as well as the research physicians involved in the performance of the glucose clamps were blinded to the algorithm, and all available data were included into the final analysis even if they were clearly affected by artifacts such as clotting, leakage of the tubing material, movements of the subjects’ arm, and so on. Thus, there was little room for analysis bias even without blinding. Investigator bias can be excluded in an automated clamp study, because GIR is calculated by the algorithms only with no external input of the investigator.
In conclusion, our data show that Clamp-PID algorithm for the calculation of GIR in automated glucose clamp studies is safe and effective in achieving mean BG close to the predefined clamp target glucose level. With fast-acting insulins, the Clamp-PID algorithm outperforms the well-established BS algorithm when comparing clamp quality parameters precision and ACD. Additional studies will investigate the suitability of the Clamp-PID algorithm for other settings such as insulin sensitivity clamps or PD investigations of slower-acting insulins.
Footnotes
Acknowledgements
We are very grateful to the clinical staff at Profil for performing the in vivo clamp experiments led by LN and to Silke Zeugner for performing the in vitro experiments. CB and MK performed the simulations and analyzed the data, wrote the manuscript, and contributed together with LN and TH to the discussion and interpretation of the results. All authors reviewed and approved the manuscript.
Abbreviations
ACD, absolute control deviation; BG, blood glucose; BMI, body mass index; BS algorithm, Biostator algorithm; CV, coefficient of variation; GIR, glucose infusion rate; PID, proportional-integral-derivative; SD, standard deviation.
Declaration of Conflicting Interests
The author(s) declared the following potential conflicts of interest with respect to the research, authorship, and/or publication of this article: CB, MK, LN, and TH are employees and TH is shareholder of Profil, Neuss, Germany, a private research institute where the ClampArt device was developed and is being used.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
