Abstract
Type-I Diabetes (TID) is a chronic autoimmune disease that elevates the glucose levels in the patient’s bloodstream. This paper formulates a fractional complex-order Proportional-Integral-Derivative (PID) control strategy for robust Blood Glucose (BG) regulation in TID patients. The glucose-insulin dynamics in blood plasma are modeled via the Bergman-Minimal-Model. The proposed control procedure employs the ubiquitous fractional order PID controller as the baseline BG regulator. The design flexibility of the baseline regulator to effectively normalize the BG levels is enhanced by assigning complex orders to the integral and differential operators instead. The resulting Complex Order PID (CO-PID) regulator strengthens the controller’s robustness against abrupt variations in the patient’s BG levels caused by meal disturbances or sensor noise. The controller parameters are numerically optimized offline. The aforesaid propositions are justified by performing credible simulations in which the proposed controller is tasked to effectively track a set point value of 80 mg/dL from an initial state of hyperglycemia under various disturbance factors. As compared to the FO-PID controller, the CO-PID controller improves the reference tracking-error, transient recovery-time, and control expenditure by 13.1%, 33.4%, and 28.1%, respectively. The simulation results validate the superior reference-tracking accuracy of the proposed CO-PID controller for BG regulation.
Introduction
Type-I Diabetes (TID) is a chronic organ-specific disease that destroys the insulin-generating pancreatic T-cells, thus, preventing them to generate sufficient insulin in the blood plasma. 1 This inevitably creates an impairment in the generation and utilization of insulin, which elevates the glucose levels in the patient’s bloodstream. 2 The insufficient insulin production, or hyperglycemia, in the patient’s body eventually leads to a life-long reliance on exogenous insulin therapy for the maintenance of normal glycemic control. 3 The closed loop glucose-insulin regulation systems, as illustrated in Figure 1, are used by TID patients to normalize the blood glucose (BG) levels. The closed-loop system contains a sensor that continually measures the BG levels and feeds them to a feedback control law that operates the insulin pump to appropriately alter the insulin infusion rate (IIR) in patient’s bloodstream. 4 Designing agile and robust glycemic control laws for TID patients is a complex control engineering problem.

Closed-loop glucose-insulin regulation mechanism.
Extensive research has been conducted by scientists and researchers to devise reliable BG regulation control strategies to improve the external insulin administration process for the reliable glycemic control of TID patients.5–7 The PID controller is a computationally simple model-free control strategy that uses the system’s state error dynamics to yield a reliable control effort. 8 However, it lacks the degree of freedom to effectively compensate for the non-vanishing disturbances and random noise. 9 Other notable control schemes used for robust BG regulatory control are sliding-mode controllers,10,11 linear quadratic regulators, 12 neural controllers, 13 etc. Each of these control schemes tends to make a trade-off between the controller’s computational complexity, robustness, time optimality, and control efficiency. Recently, a novel deep learned type-II fuzzy logic glycemic control approach for type-I diabetes patients has been proposed in Mosavi et al. 14 The said scheme employs the fuzzy immersion and invariance theorem to establish online adaptive tuning rules for unknown parameters that harness the controller’s ability to robustly compensate for the estimations errors and regulate the BG levels in a short time. However, the aforementioned scheme requires specialized computational resources for its execution.
The PID controller’s design flexibility is generally improved by restructuring the control law with the aid of fractional calculus. 15 This objective is achieved by replacing the PID controller’s integer-order integral and differential operators with fractional-order counterparts. 16 The fractional-order controller optimizes the control resource application to effectively reject external disturbances, chaotic behavior, and intrinsic nonlinearities. 17 Although, this scheme optimizes the controller’s design flexibility and increases its degrees of freedom to better address the exogenous disturbances; however, it also introduces two new parameters in the control law to be pre-specified by the control expert. The fractional order controllers have yielded promising results in regulating the BG levels in TID patients. 18
The ability of the conventional fractional order controller to address the nonlinear behavior of chaotic systems can be harnessed by extending it to complex controllers.
19
The complex controllers are realized by replacing the integer-order integral and differential operators with the complex-order counterparts of the form
The main contribution of this article is the systematic formulation and verification of the Complex-Order PID (CO-PID) controller for the normalization and robust regulation of BG levels in TID patients. The Bergman Minimal Model (BMM) is commonly used to dynamically model the glucose-insulin interaction in patients.10,15 The FO-PID controller is used as the baseline BG regulator, since it has been observed to effectively normalize the BG levels in TID patients.15,17 This observation sets a clear motivation to systematically evolve the FO-PID controller into the proposed CO-PID control law, an improved variant, to further robustify the system’s glycemic disturbance attenuation capacity. Moreover, the CO-PID scheme is relatively more flexible to deal with inherently chaotic and complex physical systems. Since the BG regulation problem manifests the aforementioned properties; therefore, the usage of CO-PID control law in this research is warranted. The innovative contributions of this article are thus presented as follows:
Formulation and calibration of a CO-PID control law for the BG regulation and normalization. This is done by augmenting the integral and differential operators of the baseline controller with complex orders instead.
Verification of the proposed control law via credible simulations to normalize the BG levels of a patient (modeled via BMM) to a set point of 80 mg/dL from an initial state of hyperglycemia, under the influence of meal disturbance and sensor noise.
The formulation of the CO-PID controllers introduces multiple parameters in the control law that significantly increase the controller’s degrees of freedom, which in turn enables it to better address the parametric disturbances and effectively normalize the BG levels. All controller parameters are numerically selected offline by using a well-established numerical optimization method. The CO-PID control law can be easily realized by using modern embedded processors. The computational realization as well as the simulated testing of the proposed BG regulator is done in the MATLAB SIMULINK environment. The design and verification of the proposed CO-PID glycemic control law, to optimize the BG regulation in TID patients under exogenous disturbances, has never been attempted previously in the scientific literature available. Thus, this article primarily focuses on this innovative idea.
The remaining paper is organized as follows. The dynamics of the glucose-insulin regulation mechanism and the associated baseline FO-PID control law are discussed in Section 2. The formulation of the proposed CO-PID control law is presented in Section 3. The parameter tuning procedure is discussed in Section 4. The simulation results are analyzed in Section 5. Finally, the article is concluded in Section 6.
Glucose-insulin regulation mechanism
This article synthesizes an optimal insulin delivery system for diabetics to effectively reduce their high BG levels. 10 The BG levels within the patient’s body tend to get disturbed by the excessive or insufficient infusion of insulin, which adversely affects the patient’s health. The closed-loop glucose-insulin regulation system is an automated BG control scheme that administers the precise amount of glucose. The subcutaneous injection technique imitates the biological insulin discharge, and thus, it is regarded as the most secure method of administering an insulin dose to the body. The close-loop insulin infusion technique is already depicted in Figure 1. The system continually monitors the BG level during insulin infusion via a dedicated sensor. The sensor feedback is compared with the reference set-point. The corresponding deviations in the desired and actual BG levels are fed to a feedback controller that appropriately manipulates the exogenous insulin infusion rate to normalize the BG levels. The controller stops the infusion when the actual and desired BG levels become equal.
Mathematical model for glucose-insulin dynamics
The BMM is the most commonly used mathematical model for representing the kinetics of glucose-insulin interaction. 15 The model offers minimal biological complexities which makes it a viable option for evaluating the effectiveness of the artificial pancreas. The BMM represents the dynamics of glucose and insulin via the following set of first-order differential equations. 23
where,
where,
The nominal state-space model representing the glucose-insulin dynamics are given by equation (4). 23
As per the matrix, the system has only one output variable,
BMM parameters for three different patients. 10
Fractional-order PID control
The PID control law is formulated as a weighted sum of the system’s classical state error, error-integral, and error-derivative. 24 The proportional term rejects the instantaneous error, the derivative term speeds up the transient response and predicts the system’s future state variations, and the error-integral term optimizes the system’s reference-tracking behavior and damps the steady-state fluctuations. The conventional integer-order PID control law formulation for BG regulation is expressed below. 25
where,
The conventional PID control law lacks the necessary degrees of freedom to effectively compensate for bounded disturbances in BG regulation systems owing to its integer-order integral and differential operators. Hence, in this work, the PID control law is augmented with fractional calculus to improve its design flexibility.
In fractional calculus, the integral and differential operators involved in the control law are assigned pre-calibrated fractional powers rather than the usual integer ones.
26
The generalized fractional order of the operator is denoted by the symbol
where,
where,
The FO-PID control law is formulated by supplementing the conventional PID controller with predetermined fractional orders integral and differential operators as indicated below. 29
The aforementioned FO-PID control law possesses five unique parameters that enhance the controller’s design flexibility; namely,
where,
where,
Proposed complex order PID control methodology
The CO-PID controller is an improved variant of the fractional-order controllers that further enhance the robustness and flexibility of the control law by retrofitting the integral and differential operators with complex orders rather than real-numbered integer or fractional orders. The complex order control schemes are derived from the third generation CRONE control. 30 As discussed earlier, the CO-PID control procedure has been proposed in the available literature for DC motor’s speed control, inverted pendulum’s balancing control, and surface roughness control in machining applications.21,22,31 However, the dynamics of the glucose-insulin interactions in human body are quite different than that of the aforementioned electro-mechanical systems. The CO-PID controller, formulated in this section, introduces additional controller parameters that increases the controller’s degrees of freedom and improves its design flexibility, which enables it to effectively track the reference under exogenous disturbances. Hence, the idea of formulating a CO-PID controller for glycemic control application is being investigated in this article.
The formulation of the CO-PID control law for the BG regulation system is presented in equation (12).
where,
The differential operator in the modified transfer function can be simplified as shown below. 22
In real-time applications, a feedback control law is required to deliver real output for a real input signal. Hence, the differential operator is approximated by considering only its real part as shown below. 22
The integral operator in the modified transfer function can also be simplified as shown below. 22
By considering only the real part, the integral operator can be approximated as shown below. 22
The simplified transfer function of the control law is thus formulated as shown below.
The CO-PID transfer function in (18) is quite similar to the FO-PID transfer function shown in (10). The only modification comes in the form of the two new weights assigned to the integral and differential terms. These weights are formulated as the cosines of natural logarithms of integer-order integrals and derivatives of the state error variable. It is to be noted that the coefficient of the complex order’s imaginary part modulates each
The magnitude of the
To maintain a stable control behavior, the variations in the internal constituents of the

Block diagram of the CO-PID control law.
Parameter tuning procedure
Optimizing the controller parameters is very crucial to generate an optimal control yield. However, selecting a unique set of parameters that yield optimum time-domain performance and control efficiency under every operating condition is an ill-posed problem. 30 Owing to the contradictory nature of these factors, generally, a compromise is made between the controller’s time optimality, and control input economy. The analytical tuning methods are hard to track. The empirical settings of the PID gains are constrained by the designer’s experience, and thus, may not always produce precise position regulation or transitory recovery behavior. Hence, in this work, the following quadratic cost function is employed that iteratively minimizes the variations in the control input as well as the classical error. 15
To ensure optimal tuning, a weight of 10 is assigned to error-minimization criteria, so that the transgressions in the BG concentration levels are penalized more than that of the control-minimization criteria.
15
The controller parameters are optimized via simulations as discussed in Section 5.1. The flow chart in Figure 3 depicts the parameter tuning algorithm. The BMM parameters of patient 1 are used as the reference for the parameter tuning procedure. The offline selection process is initiated by picking a random set of controller parameters (PID gains and fractional/complex orders) from the pre-defined search space. In every simulation trial, the controller parameters are empirically updated and the control system is tasked to regulate the virtual patient’s BG levels at 80 mg/dL from an initial state of hyperglycemia for 500 min. The resulting cost

Flow chart of the parameter tuning algorithm.
Optimized controller parameters.
Simulations and analysis
This section presents the simulation-based testing of the designed BG regulation control schemes along with a comprehensive analysis of the acquired results.
Simulation setup
The time-domain performance of the FO-PID and CO-PID control schemes is comparatively analyzed via credible simulations. The customized control application is implemented and the simulations are carried out using the MATLAB/Simulink R2018b software environment.
33
The software is operated on a personal computer that is equipped with a 64 -bit, 2.4 GHz CPU, and 8.0 GB RAM. The fractional operators in the FO-PID and CO-PID control laws are implemented by using the built-in functions in MATLAB’s FOMCON toolbox. The sampling time is set at 1.0 min. As discussed in Section 2, the dynamics of the virtual diabetic patients are simulated using three different BMMs to validate the BG regulation performance of the control laws to ascertain the controller’s performance under parametric variations. The BMM parameters for three different virtual patients are also considered in the presence of sensor noise and meal disturbance. The three different sets of model parameters are already listed in Table 1. The IIR signal
Simulation results
The efficacy of the proposed CO-PID controller is analyzed against the FO-PID controllers via the following two test cases. The tests are conducted on the three virtual patients whose BMM parameters are identified in Table 1. In each test case, the closed-loop system is tasked to track the BG level set-point of 80 mg/dL. White Gaussian noise is introduced in
A. BG regulation under normal conditions: This simulation serves to examine the capability of the designed control law to regulate the BG levels of the three patients to 80 mg/dL from an initial state of hyperglycemia (200 mg/dL). To emulate the effects of measurement noise contributed by the glucose sensor, a white Gaussian noise signal having a mean of zero and variance of 0.2 is introduced in
B. BG regulation under meal disturbance: This simulation serves to analyze the controller’s resilience against the bounded exogenous disturbances that are normally caused by the meal intake. The effects of meal disturbance and sensor noise are emulated by administering a simulated impulse signal in

(a) BG levels of Patient 1 under normal conditions and (b) IIR (control input) for Patient 1 under normal conditions.

(a) BG levels of Patient 2 under normal conditions and (b) IIR (control input) for Patient 2 under normal conditions.

(a) BG levels of Patient 3 under normal conditions and (b) IIR (control input) for Patient 3 under normal conditions.

(a) BG levels of Patient 1 under meal disturbance and (b) IIR (control input) for Patient 1 under meal disturbance.

(a) BG levels of Patient 2 under meal disturbance and (b) IIR (control input) for Patient 2 under meal disturbance.

(a) BG levels of Patient 3 under meal disturbance and (b) IIR (control input) for Patient 3 under meal disturbance.
Analytical discussion
The simulation results are examined as per the following Key-Performance-Metrics (KPMs).
The RMSE is calculated as shown below.
where,
The IIRMS is calculated as shown below.
These KPMs are used to quantitatively analyze the performance and robustness of the designed BG regulation control procedures. The simulation results are summarized in Table 3. The quantitative analysis of the simulation results validates the superior time optimality and disturbance-response speed of the CO-PID controller as compared to the FO-PID controller.
Summary of simulation results.
In
In
As compared to the FO-PID controller, the CO-PID controller renders a mean improvement of 13.1%, 56.8%, 25.9%, 33.4%, 30.9%, 28.1%, and 26.2% in the RMSE, IAE, Tfall, Trec, Tset, IIRMS, and IIRp, respectively. The significant improvement in the transient response speed and the control input efficiency of the CO-PID controller is credited to the enhancement in the controller’s degree of freedom contributed by the allocation of complex orders to integral and differential operators. This arrangement indirectly modifies the derivative and integral gains online to improve the controller’s adaptability to execute better reference tracking accuracy and transient recovery response, even under exogenous disturbances. Furthermore, it achieves the aforementioned feats without compromising the control input (IIR) economy which is yet another remarkable milestone. Although the CO-PID control procedure requires the offline tuning of seven distinct parameters which is indeed a laborious task; however, the enhanced time optimality offered by the said procedure exceeds this disadvantage.
The proposed CO-PID controller’s performance is also compared with the state-of-the-art controllers presented in Delavari et al. 10 to further validate its effectiveness in addressing the BG regulation problem. These state-of-the-art control schemes include the super-twisting sliding-mode-controller (STSMC), higher-order SMC (HOSMC), fractional-order SMC (FOSMC), and adaptive fractional-order SMC (AFOSMC). The aforementioned controllers were applied to the same set of three patient models, as described in Table 1, to carry out the simulations A and B in Delavari et al. 10 The reader is referred to Delavari et al. 10 for visualizing the simulation results of the aforementioned controllers. In this article, the performance comparison is done on the basis of the IAE metric expressed in Guras et al. 24 . The summary of performance comparison is quantified in Table 4. The quantitative analysis also validates the enhanced BG regulation capability of the CO-PID controller as compared to other state-of-the-art controllers. The AFOSMC is declared as the proposed control law in Delavari et al. 10 As compared to the AFOSMC, the CO-PID controller demonstrates an improvement of 10.0%, −6.8%, and 15.7% in the IAE of Patients 1, 2, and 3, respectively, for Simulation A. For Simulation B, the CO-PID controller exhibits a relative improvement of 11.6%, −5.9%, and 3.8% in the IAE of Patients 1, 2, and 3, respectively, as compared to AFOSMC.
Performance comparison with other controllers.
A special comparison case
To better ascertain their effectiveness and time-optimality of the FO-PID and CO-PID controller in regulating the BG levels, the performance of these controllers with various orders of the differential operator is being analyzed in this section. The analysis is done by carrying out additional simulations of test cases A and B.
Firstly, two new FO-PID controller variants are introduced and their behavior is benchmarked against the original FO-PID controller (See Table 2). The original control law is referred to as FO-PID-1 controller for this comparison. The value of
Modified FO-PID controller variants.

(a) BG levels of Patient 2 with different FO-PID controller variants under normal conditions, (b) IIR (control input) for Patient 2 with different FO-PID controller variants under normal conditions.

(a) BG levels of Patient 2 with different FO-PID controller variants under meal disturbance, (b) IIR (control input) for Patient 2 with different FO-PID controller variants under meal disturbance.
Simulation results with different FO-PID controller variants.
Similar to the process discussed above, two new CO-PID controller variants are also introduced and their behavior is benchmarked against the original CO-PID (CO-PID-1) controller (optimized in Table 2). The values of both parameters
Modified CO-PID controller variants.

(a) BG levels of Patient 2 with different CO-PID controller variants under normal conditions, (b) IIR (control input) for Patient 2 with different CO-PID controller variants under normal conditions.

(a) BG levels of Patient 2 with different CO-PID controller variants under meal disturbance, (b) IIR (control input) for Patient 2 with different CO-PID controller variants under meal disturbance.
Simulation results with different CO-PID controller variants.
Conclusion
This article methodically formulates and verifies the efficacy of a flexible CO-PID controller to improve the BG normalization behavior in TID patients, especially under the influence of meal disturbances and exogenous noise sources. The BG regulation in TID patients via closed-loop feedback control procedure is a difficult task. The proposed control procedure is realized by augmenting the integral and differential operators of the ubiquitous PID baseline controller with complex order. The controller’s transformation into complex order controllers increases its design flexibility and time optimality, thus equipping it to exhibit a faster tracking speed and stronger immunity against disturbances.
The simulation results validate the superior robustness and time optimality of the CO-PID controller. Additional simulations are also conducted to further analyze the time-optimality of the FO-PID and CO-PID controllers under the influence of different orders of differential operators. These simulations also validate the optimum BG regulation behavior of the originally prescribed CO-PID control law. In the future, the CO-PID controller can be augmented with intelligent systems, online supervised learning laws, or model-free expert adaptive systems to dynamically self-tune the controller parameters to further robustify its performance against hyperglycemia and exogenous disturbances. Meta-heuristic optimization algorithms can be investigated to improve the controller’s parameter tuning process. Furthermore, the type-3 fuzzy systems and controllers should also be investigated in the future to analyze their ability to further improve the performance of the closed-loop BG regulators.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
