An Intelligent Model-Based Effective Approach for Glycemic Control in Type-1 Diabetes

Type-1 diabetes mellitus (T1DM) is a challenging disorder which essentially involves regulation of the glucose levels to avoid hyperglycemia as well as hypoglycemia. For this purpose, this research paper proposes and develops control algorithms using an intelligent predictive control model, which is based on a UVA/Padova metabolic simulator. The primary objective of the designed control laws is to provide an automatic blood glucose control in insulin-dependent patients so as to improve their life quality and to reduce the need of an extremely demanding self-management plan. Various linear and nonlinear control algorithms have been explored and implemented on the estimated model. Linear techniques include the Proportional Integral Derivative (PID) and Linear Quadratic Regulator (LQR), and nonlinear control strategy includes the Sliding Mode Control (SMC), which are implemented in this research work for continuous monitoring of glucose levels. Performance comparison based on simulation results demonstrated that SMC proved to be most efficient in terms of regulating glucose profile to a reference level of 70 mg/dL compared to the classical linear techniques. A brief comparison is presented between the linear techniques (PID and LQR), and nonlinear technique (SMC) for analysis purposes proving the efficacy of the design.


Introduction
Patients having type 1 diabetes suffer from decrements in the required insulin level as a result of eradication of beta cells. Type 1 Diabetes Mellitus (T1DM) clinically appears before the age of 35 years [1]. This type of diabetes leads to hyperglycemia, which can cause further problems due to high blood glucose sugar [2]. Consequently, insulin has to be supplied in order to avoid complications, including dehydration and death [3]. Keeping an adequate level of insulin in the body is pivotal to cope with T1DM. Automatic blood glucose control in diabetic patients can improve their life and also reduce the expenditure on their treatment.
Both intelligent model-based and model-independent strategies are possible for designing an optimal controller to reduce the risk of diabetes. The latter empirical strategy does not rely on an analytical model of the glucose-insulin setup, thereby providing a control law to regulate insulin infusion using pre-available data from experiments [4]. In this regard, application and improvements of Proportional Integral Derivative (PID) controllers for regulating insulin infusion rate have been still in vogue [5]. In contrast, the strategy based on a model exploits a priori knowledge of physiological parameters. Control problem can therefore be analytically formulated in an optimal way. Technological advancements related to infusion sets and insulin pumps have improved with the progression in a variety of different designs when compared with conventional insulin injections. In [6], the authors reviewed and compared the preceding analysis and performance with the existing CSII pumps in the type 1 diabetic patients. An artificial pancreas consists of a pump for Continuous Subcutaneous Insulin Infusion (CSII), a setup for uninterrupted glucose monitoring and a control law to realize a closed-loop feedback system. In [7], authors discussed the non-trial treatment for type 1 diabetic patients using Do-It-Yourself Artificial Pancreas systems (DIY-APS), which is an open source and hybrid closed-loop system. The research work amalgamates the promising and upcoming clinical literature related to DIY-APS with the point of views suggested by different healthcare professionals and DIY-APS users to improve the daily routine plan for type 1 patients in a real-life scenario. Authors presented a detailed discussion regarding the advancements in the closed-loop design of systems for efficient handling of patients with diabetes. The study focused on the working of artificial pancreas demonstrating the improvement in glycemic effects and lessening the load of a hectic self-management plan in daily life for diabetic patients [8].
The classical model for blood glucose control describes glucose-insulin kinetics with the help of nonlinear differential equations. Proposed in the early 1980s, it was a single compartment model based on conceptual compartmentalization of insulin storage. In [9], the authors presented and discussed the pros and cons of the different insulin delivery systems designed via closed-loop configuration for examining the blood glucose levels. The research study covered the concepts from early technologies including syringes, needles to bionic pancreas and (DIYAPS). For the injection of insulin, it is important to take note of exercise routine, current glucose levels and the idea of food intake as it affects glucose levels considerably. Authors suggested a design of mobile application for diabetic patients based on mathematical models illustrating the effects of blood-glucose concentration. The proposed application caters the effects produced during the process of meal intakes and exercise periods on the blood-glucose concentration [10]. A two-compartmental model is designed using a minimal model for plasma-glucose concentrations for healthy and T1D patients [11]. In a study, authors presented an alternative approach for subcutaneous insulin infusion. Regardless of the current technological advancements, the aforesaid scheme has a limited scope for insulin control. This research study deals with the design of Intraperitoneal (IP) insulin control for the distribution and absorption of insulin [12].
Various control algorithms based on a variety of these mathematical models have been reported for optimization of insulin therapy procedures in patients suffering from diabetes. Some of these developments are based on the Proportional Integral Derivative (PID), which is widely used in control applications due to its inherent capability to obtain quick transient response in terms of achieving a steady state in less time and to reduce steady-state error. In [13], a PID controller is used for the infusion of insulin and glucagon to control the glucose levels in the patient's body using artificial intelligence and predictive control resulting in the lower range of glucose concentration. In [14], two different control strategies, MPC and PID, are evaluated to control the glucose levels in patients affected from exercise and meal intakes to avoid hypoglycemia. Pole placement and optimal control algorithms have also been applied for insulin infusion. Moreover, a number of Model Predictive Control (MPC) laws have been realized and tested in clinical trials which show better results in managing constraints on the controlled and manipulated variables in a systematic manner. A novel strategy was designed in [15] to regulate the parameters of insulin-on-board (IOB) in a real-world scenario. The suggested design was distinctly completed using two different approaches for fasting periods and postprandial periods. The results obtained using the designed technique showed glucose levels in the desired range maintaining the patient's safety and health. Furthermore, control techniques like Linear Parameter Varying (LPV)-based laws offer a multivariable controller to ensure robustness and to address bandwidth limitations. In [16], a linear filter is proposed using a LPV-based controller to achieve the required plasma-glucose concentrations showing the efficacy of the design for insulin infusion. Another control technique, H-infinity, offers high disturbance rejection and more stability due to its nonlinear nature. [17], showed that large nonlinearity and uncertainty involved in the mathematical representation of the insulin metabolism process lead to the design of the H-infinity controller. The controller was designed to regulate the plasma-glucose concentration for T1DM patients by minimizing the magnitude of the H-infinity norm with respect to external disturbances present in the closed-loop system.
Fuzzy-logic theory has also been applied for insulin infusion. A Mamdani-type fuzzy control scheme is used in a closed-loop manner to maintain the glucose levels in type 1 diabetic patients. Simulation results showed that the designed control algorithm can be used successfully for designing the artificial pancreas [18].
Due to the linear nature of most of the control strategies discussed above, these techniques are incapable of adequately dealing with uncertainties and disturbances which are inherently present in the real-world systems. The present study aimed to design control strategies based on the Linear Quadratic Regulator (LQR) and Sliding Mode Control (SMC), which according to our knowledge, has not been applied comprehensively and comparatively on the estimated model reported in [19]. PID has been chosen as a classical benchmark for performance comparison. LQR is a linear control method which is well known for its feature of decreasing the control effort to optimize the designed controller by an appropriate choice of Q and R matrices [20]. The reliability of the control law designed in LQR is a function of these matrices and may require different values of the matrices in different control scenarios. For the systems with unmodeled disturbances and parametric variations, the SMC technique is an attractive control method due to its robust nature and disturbance rejection capability [21]. SMC was selected due to its robustness, finite-time convergence, ultimate accuracy and insensitive nature to external and internal disturbances [22]. Consequently, SMC serves as an appropriate choice for physiological settings requiring high precision. The emphasis of this research article is on the control design to regulate the insulin infusion using linear and nonlinear control techniques. The controller designed through the nonlinear control technique, SMC, achieves the desired glucose levels (70 mg/dL) in minimum time, proving the efficacy of the design. Simulation results obtained with the SMC controller show better performance in terms of their time domain specifications when compared with linear (PID and LQR) and nonlinear transformation-based SMC controllers available in literature.
The paper is organized in six sections. The dynamic model of a glucose insulin system is derived in Section 2. The theoretical basis of a controller design and functions are discussed in detail in Section 3. Section 4 presents the simulation results and discussion. Section 5 shows the comparison between two linear control techniques (PID and LQR) used in this research work and a nonlinear control technique Sliding Mode Control (SMC). Finally, Section 6 concludes the paper.

The Estimated Model
The estimated model approach to describe system dynamics of glucose insulin relies on data extracted from sources such as research studies, hospitals and diabetes simulators, e.g., Attention Interest Desire Action (AIDA), UVA/Padova, ESIM simulator, etc. In the present research, an estimated model has been derived using a UVA/Padova simulator. The identification procedure is detailed below: for each in silico patient, the deviation of insulin delivery from the desired glucose concentration is identified by a linear model. To ensure capturing of the response at various points, interstitial concentrations of 90, 120 and 150 mg/dL of glucose have been taken. Thus, three linear models corresponding to each patient have been obtained. For a particular concentration of glucose, the identification process consists of obtaining the basal insulin (Ib) at steady state and then adding it to a sinusoidal insulin sweep. The glucose deviation is finally captured by infusing the signal obtained in the previous step. Subspace identification algorithms have been used to obtain third-order models in all the cases as in [23].
For control purposes, a third-order discrete transfer function G(z) relating glucose to insulin has been defined as, where p 1 , p 2 , and p 3 vary from patient to patient [19]. Figure 1 shows the basic diagram of the feedback control system. This model given in (2) has been transformed into a continuous model using zeroorder hold for computational convenience, as shown in (3). The following transfer function has been obtained by using values of parameters C o , p 1 , p 2 and p 3 as 0.132, 0.965, 0.95 and 0.93, respectively. The values are chosen such that the gain is overestimated and the phase is kept lower than all other identified models in order to obtain robustness.

Closed-Loop Response of the Estimated Model
The step response of the feedback loop system is shown in Figure 2. It is evident that system response leads to instability, which is due to presence of a pole in the Right Half-Plane (RHP), as shown in Figure 3, which illustrates a pole-zero plot. Thus, a control algorithm has to be designed that could shift the RHP pole to the Left Half-Plane (LHP), subsequently making the system response stable.

Controllability and Observability
The matrices

Controllability and Observability
The matrices ⏀ and ᴪ, (3e) and (3f), respectively indicate controllable and observable notion of the system that have been calculated by using system matrices A, B and C in ⏀ = [ , , , , ] and ᴪ = , , , … . , where "n" is the rank of matrix A. The resultant matrices given below are full-rank matrices; therefore, all states are completely controllable and observable, which implies that a state feedback controller can be designed.

Controllability and Observability
The matrices ⏀ and ᴪ, (3e) and (3f), respectively indicate controllable and observable notion of the system that have been calculated by using system matrices A, B and C in ⏀ = [ , , , , ] and ᴪ = , , , … . , where "n" is the rank of matrix A. The resultant matrices given below are full-rank matrices; therefore, all states are completely controllable and observable, which implies that a state feedback controller can be designed.
, (3e) and (3f), respectively indicate controllable and observable notion of the system that have been calculated by using system matrices A, B and C

Controllability and Observability
The matrices ⏀ and ᴪ, (3e) and (3f), respectively indicate controllable and observable notion of the system that have been calculated by using system matrices A, B and C in ⏀ = [ , , , , ] and ᴪ = , , , … . , where "n" is the rank of matrix A. The resultant matrices given below are full-rank matrices; therefore, all states are completely controllable and observable, which implies that a state feedback controller can be designed.

Controllability and Observability
The matrices ⏀ and ᴪ, (3e) and (3f), respectively indicate controllable and observable notion of the system that have been calculated by using system matrices A, B and C in ⏀ = [ , , , , ] and ᴪ = , , , … . , where "n" is the rank of matrix A. The resultant matrices given below are full-rank matrices; therefore, all states are completely controllable and observable, which implies that a state feedback controller can be designed. = C, CA, CA 2 , CA 3 . . . .CA n−1 T , where "n" is the rank of matrix A. The resultant matrices given below are full-rank matrices; therefore, all states are completely controllable and observable, which implies that a state feedback controller can be designed.

Controllability and Observability
The matrices ⏀ and ᴪ, (3e) and (3f), respectively indicate controllable and observ notion of the system that have been calculated by using system matrices A, B and C i = [ , , , , ] and ᴪ = , , , … . , where "n" is the rank of trix A. The resultant matrices given below are full-rank matrices; therefore, all states completely controllable and observable, which implies that a state feedback controller be designed. In the following section, we have shown the details of a linear (PID and LQR) nonlinear control technique (SMC), which we will be using to design the control law maintain the blood glucose level within the range.

Controller Design Methods
Over-and under-dosing of insulin in diabetics have some serious effects on t health. The major task in glycemic control is to infuse the right quantity of insulin to sure that the glucose level remains within the standard physiological range (70 to mg/dL). Both linear and nonlinear control design methods have been employed on e mated models to control the glucose level given in Section 2. In the next section, a deta and comprehensive discussion is presented for the linear and nonlinear control meth studied in this research work.

Linear Control Algorithms
Systems obeying a superposition principle are mainly controlled by linear con algorithms, as any change in system input would cause an equal amount of change in output [24]. While using linear control algorithms, model uncertainties and disturban like exercise and meal are taken as zero. In this research work, two linear control te niques, PID and LQR, are implemented for glycemic control. The objective is to adjust amount of insulin delivery so that it provides good control of glucose levels in less amo of time.

PID Control
PID controllers are widely used in industrial applications as well as in many resea areas because of their efficient nature, simplicity, fast response and having large powe overcome the steady-state error. PID controllers are the typical option to start with, reasonable results may be obtained. The quick response or the speed of the response is main advantage of PID control. The PID controllers are involved in three types of con actions, proportional control, integral control, and derivative control, wh , and are the individual gains of these control actions, respectively [25]. In PID, system output is connected with the input. If the output of the system has some differe between the reference point, then PID controllers modify the input according to the ference in the reference point and the current output. The output of the system due to proportional parameter of the controller depends on the present change in the error, put due to the integral parameter depends on the past error and the output due to derivative parameter depends on the future error. In order to get the desired output of the system in terms of transient and steady-s response, we usually adjust or tune the values of these three parameters. The PID cont ler operates on the error signal e(t) to regulate the overall control action of the system

Controllability and Observability
The matrices ⏀ and ᴪ, (3e) and (3f), respectively indicate controllable and observable notion of the system that have been calculated by using system matrices A, B and C in ⏀ = [ , , , , ] and ᴪ = , , , … . , where "n" is the rank of matrix A. The resultant matrices given below are full-rank matrices; therefore, all states are completely controllable and observable, which implies that a state feedback controller can be designed. In the following section, we have shown the details of a linear (PID and LQR) and nonlinear control technique (SMC), which we will be using to design the control laws to maintain the blood glucose level within the range.

Controller Design Methods
Over-and under-dosing of insulin in diabetics have some serious effects on their health. The major task in glycemic control is to infuse the right quantity of insulin to ensure that the glucose level remains within the standard physiological range (70 to 110 mg/dL). Both linear and nonlinear control design methods have been employed on estimated models to control the glucose level given in Section 2. In the next section, a detailed and comprehensive discussion is presented for the linear and nonlinear control methods studied in this research work.

Linear Control Algorithms
Systems obeying a superposition principle are mainly controlled by linear control algorithms, as any change in system input would cause an equal amount of change in the output [24]. While using linear control algorithms, model uncertainties and disturbances like exercise and meal are taken as zero. In this research work, two linear control techniques, PID and LQR, are implemented for glycemic control. The objective is to adjust the amount of insulin delivery so that it provides good control of glucose levels in less amount of time.

PID Control
PID controllers are widely used in industrial applications as well as in many research areas because of their efficient nature, simplicity, fast response and having large power to overcome the steady-state error. PID controllers are the typical option to start with, and reasonable results may be obtained. The quick response or the speed of the response is the main advantage of PID control. The PID controllers are involved in three types of control actions, proportional control, integral control, and derivative control, where , and are the individual gains of these control actions, respectively [25]. In PID, the system output is connected with the input. If the output of the system has some difference between the reference point, then PID controllers modify the input according to the difference in the reference point and the current output. The output of the system due to the proportional parameter of the controller depends on the present change in the error, output due to the integral parameter depends on the past error and the output due to the derivative parameter depends on the future error.
In order to get the desired output of the system in terms of transient and steady-state response, we usually adjust or tune the values of these three parameters. The PID controller operates on the error signal e(t) to regulate the overall control action of the system. In In the following section, we have shown the details of a linear (PID and LQR) and nonlinear control technique (SMC), which we will be using to design the control laws to maintain the blood glucose level within the range.

Controller Design Methods
Over-and under-dosing of insulin in diabetics have some serious effects on their health. The major task in glycemic control is to infuse the right quantity of insulin to ensure that the glucose level remains within the standard physiological range (70 to 110 mg/dL). Both linear and nonlinear control design methods have been employed on estimated models to control the glucose level given in Section 2. In the next section, a detailed and comprehensive discussion is presented for the linear and nonlinear control methods studied in this research work.

Linear Control Algorithms
Systems obeying a superposition principle are mainly controlled by linear control algorithms, as any change in system input would cause an equal amount of change in the output [24]. While using linear control algorithms, model uncertainties and disturbances like exercise and meal are taken as zero. In this research work, two linear control techniques, PID and LQR, are implemented for glycemic control. The objective is to adjust the amount of insulin delivery so that it provides good control of glucose levels in less amount of time.

PID Control
PID controllers are widely used in industrial applications as well as in many research areas because of their efficient nature, simplicity, fast response and having large power to overcome the steady-state error. PID controllers are the typical option to start with, and reasonable results may be obtained. The quick response or the speed of the response is the main advantage of PID control. The PID controllers are involved in three types of control actions, proportional control, integral control, and derivative control, where k p , k i and k d are the individual gains of these control actions, respectively [25]. In PID, the system output is connected with the input. If the output of the system has some difference between the reference point, then PID controllers modify the input according to the difference in the reference point and the current output. The output of the system due to the proportional parameter of the controller depends on the present change in the error, output due to the integral parameter depends on the past error and the output due to the derivative parameter depends on the future error.
In order to get the desired output of the system in terms of transient and steady-state response, we usually adjust or tune the values of these three parameters. The PID controller operates on the error signal e(t) to regulate the overall control action of the system. In this control law, the control input which minimizes the error is the weighted sum of three terms, i.e., u(t) = k p e(t) + k i e(t)dt + k d de(t) dt and its s-domain transfer function is shown in (5) as, k p represents the present gain of the error, k i represents the past error and k d represents the future error, t is instantaneous time, e(t) is the difference between measured and desired glucose values and u(t) is the control input. Table 1 shows the effect of different gains of the PID controller.

Linear Quadratic Regulator
This is an optimal control law which serves as a basis for robust techniques. Systems with conventional LQR controllers present good stability properties and are optimal with respect to a certain performance index. However, LQR control does not assure robust stability when the system is highly uncertain. The classic LQR approach deals with the optimization of a cost function or performance index. Thus, the designer can weight which states and which inputs are more important in the control action to seek for appropriate transient and steady-state performances. The main objective in this method is to minimize quadratic cost function given using, where R = R t > 0, Q = Q t ≥ 0 are matrices satisfying positive definite property. The LQR problem can be viewed as the weighted minimization of a linear combination of the states "x" and the control input u. The cost function, defined by quadratic equation, is minimum where the dynamic system is described by a linear differential equation. The Q matrix deals with the bad performance of the system and the R matrix deals with how much the effort is required in the system. The integral part shows how quickly the system returned to its normal position. In order to calculate the gain matrix K, the following relation has been used, where P also satisfies the positive definite property. Proper functioning of the control systems designed through linear control approaches heavily rely on the fact that the model parameters to be analyzed should be valid in the small operating range. Because of such limitations, systems designed with linear strategies might perform inadequately or often become unstable, staying far from the required specifications. Linear controllers are not sufficiently skilled to handle uncertainties and nonlinearities influencing the system. Contrary to linear control strategies, nonlinear control methods are very useful under circumstances where uncertainties and nonlinearities have a pivotal role in the system. Nonlinear controller design techniques accommodate the uncertainties and nonlinearities existing in the system and achieving a stable state efficiently. In the next subsection, a brief theoretical background related to the Sliding Mode Control (SMC) is presented for controller design.

Nonlinear Control Method
Nonlinear control methods are applicable on the systems which are time-variant, nonlinear in behavior, or both. This theory is generally applied to real-world control systems owing to their inherently nonlinear nature [26,27]. The major advantage of this theory is that it ensures robustness against uncertainties and disturbances. Nonlinear control strategies may lead towards the simpler controller design when compared to its corresponding linear part while having the superior performance. In practical scenarios with linear techniques, high-quality sensors and actuators are needed to generate and record the linear behavior for the proper functioning of the control system in the desired range, whereas a similar control system designed through nonlinear method may permit the designer to use the cheaper components having nonlinear properties.
In this research work, a nonlinear control strategy, the Sliding Mode Control (SMC), is used to design the control law to regulate the glucose level in a diabetic patient. The robust nature of the Sliding Mode Control to cater to the effects of external disturbances acting on the system inspired the control engineers to explore this technique for diverse applications, especially in the biomedical field.
SMC is a nonlinear control method which changes the nonlinear dynamics and ensures robustness [28,29]. The basic principle of SMC is to changes system dynamics in such a way that states remain on a sliding manifold, as parameters are varied by the controller. The main property of this design technique is the enforcement of the states of the system trajectories onto a defined surface, resulting in a reaching phase [30]. These surfaces are also known as manifold and created as some hypersurface or intersection of hypersurfaces in the state space known as switching surfaces. As the states of the system reach the switching surface, the structure of the feedback loop is adaptively altered to slide the system states along the switching manifold, and this phase is known as the sliding phase.
While using SMC for glycemic control, the primary objective is to ensure robustness against disturbances such as exercises and meals. In this regard, a sliding surface s comprising of system states is designed.
In this procedure, the system states move from the non-zero initial state towards the sliding surface and stay on that surface for all future values of time. The designed control law consists of two parts: u eq and u disc , corresponding to the reaching phase and sliding phase respectively, where u eq and u disc are the equivalent control and discontinuous control, respectively. The control law designed by using the sliding mode control is given as, u = u eq + u disc (8) u eq is designed by putting the derivative of sliding surface equal to zero. u disc is obtained with such conditions that it rejects the effect of the disturbance terms and maintains the derivative of the sliding surface equal to zero. Usually, u disc = −ksign(s) (9) For stability purposes, the Lyapunov candidate function is defined as, with s being sliding surface and this Lyapunov function is positive definite if and only if, Section 4.3 shows in detail the steps needed to design a Sliding Mode Controller. In the following section, a detailed discussion is presented on the simulation results obtained using PID, LQR and SMC for analysis and comparison purposes.

Results and Discussion
This section shows the design with simulation results of each controller studied in this research work in maintaining the glucose concentration level within normal range for diabetic patients in detail. To investigate the performance of a feedback-controlled insulin infusion system, the predefined model shown in (1) is analyzed individually. Simulation results of the system without a controller in terms of its bode plot, root locus and step response are shown in Figures 4-6. The frequency response shows that the system is not stable, as well as the root locus in which the poles are in Right Half-Plane. Similarly, the step response shows that the system is not following the step input. These results reflect clearly the unstable nature of the system which demands the need of a controller that can handle and control the insulin infusion system for the adequate supply of insulin to the patients.   Step response of the system.

PID Controller
In order to maintain glucose concentration within a normal range in the human body, a Proportional, Integral, Derivative control-based technique is designed and implemented. The PID controller is successfully implemented to control the concentration of glucose level in blood. The step response of the system follows the step input with the PID controller, showing the stability of the insulin infusion system, as depicted in Figure 7. Similarly, the root locus of the system in the presence of a designed PID controller shows that the poles move towards the Left Half-Plane, as shown in Figure 8. The tuning parameters for the PID controller are chosen as follows, and are shown in Table 2. The glucose profile shown in Figure 9 reveals that, by using the PID controller, the glucose level is maintained in the defined range and it can be interpreted that a glucose level of 70 mg/dL is obtained after approximately 430 s, thus demonstrating very large settling time.

Figure 7.
Step response using the PID controller.

Linear Quadratic Regulator
Since states are controllable and observable, choosing R = I and Q matrix as under, The gain matrix k is found to be, Simulation results for the glucose profile using LQR are shown in Figure 10. It is evident that the same glucose level of 70 mg/dL is achieved at around 113 s, showing better performance compared to the PID controller in terms of settling time. A major drawback of a linear control algorithm is that it cannot perform adequately in the presence of disturbances and uncertainties. The uncertainties appearing in the system may be caused by variations in parameters, unmodeled dynamics and internal and external disturbances. These limitations and poor performance in linear control techniques motivated us to apply a nonlinear control method on the same model, since nonlinear techniques overperform compared to their linear counterparts, as highlighted in [31,32].

Sliding Mode Control
The design of a control law based on SMC requires definition of a sliding surface shown as, where c 1 , c 2 and c 3 are tuning parameters. With c 1 and c 3 = 1, the values of other parameters are chosen in a way that the derivative of the sliding surface becomes Hurwitz monic-polynomial. This condition ensures reduction in order of the system, which can be represented with n − 1 states. Such a system demonstrates insensitivity to matched uncertainties. Taking the derivative of Equation (13) wrt time t , we get, Now, let us define a positive definite Lyapunov function as under, Differentiating wrt time t , we obtain, Using the value of . s in (16), we get, From state equations, we have, The equivalent control forces the system dynamics to move to the sliding surface and depends on the states of the system and state parameters. It makes the derivative of sliding manifold equal to zero. Therefore, taking . s = 0, the control input u is defined as, 2.416 10 −4 x 1 + 5.7105 10 −4 x 2 − 9.105 10 −5 x 3 + 0.25u = 0 (19) The overall control law u designed through SMC consists of equivalent control (u eq ) and discontinuous control (u disc ), i.e., u = u eq + u disc (21) The designed control law including u disc can be written as, u eq = 1 0. 25 ( −2.416 10 −4 x 1 − 5.7105 10 −4 x 2 + 9.105 10 −5 x 3 + u disc (22) where u disc = −k 1 s − k s Sign(s) is the discontinuous control, and k 1 and k 2 are control parameters for tuning, where u disc can be completely defined using signum function as, Thus, we can write, .
This relation shows that the Lyapunov function is negative-definite. Equation (22) shows the derived control law using the nonlinear control strategy (SMC). To investigate and characterize the performance of the designed controller, the resultant control law is implemented in MATLAB, which shows better results as compared to the linear control strategies (PID and LQR) in terms of transient and steady-state parameters. Table 3 lists values of various parameters used in the design of SMC-based law. A reference glucose level of 70 mg/dL is defined using MATLAB function. The quantity of infused insulin is determined by the designed control law. Simulation results for glucose profile using SMC are shown in Figure 11. The designed controller efficiently tracks the basal value after starting from a high value of blood glucose level, i.e., 200 mg/dL shown in Figure 11. The SMC-based control law depicts far better performance in terms of settling time by acquiring the required glucose level in about 15 s, thus proving the accuracy and robustness of the SMC controller. The reduced value of settling time shows that the desired blood-glucose concentration is achieved earlier and the system becomes stable in less time, facilitating the T1DM patients for have a normalized blood-glucose level in less time. Simulation results show that SMC also performs well in dealing with the system uncertainties compared to PID and LQR. The robustness of the designed controller against uncertainties can be characterized by introducing a disturbance in the form of a sinusoidal signal.
One major drawback while using first-order SMC is chattering, a common phenomenon which arises due to fast switching of control action around the sliding surfaces. Chattering in control input u can be seen in Figure 12; since high amplitude of chattering is undesirable, low-pass filters can be used along with SMC, which can reduce this high-frequency switching [33].
The following section shows a comparative analysis between the two linear control techniques used in this study and SMC with the work presented in [34].

Comparative Analysis
In this section, a detailed and comprehensive analysis is drawn on the basis of time response specifications between the two linear control techniques used in this research work (PID and LQR). In both cases, a blood-glucose concentration of 70 mg/dL is achieved successfully, resulting in the minimum steady-state error. The large transient part of the blood-glucose profile with the PID controller shows that the steady state is achieved in more time, resulting in a large time constant and, therefore, larger settling time. The small transient part of the blood-glucose profile with LQR shows that the steady state is achieved earlier or in less time, resulting in a small time constant and, therefore, small settling time. A small value of settling time shows that the system achieved stability in less time with LQR as compared to PID. The settling time in the case of PID is 430 s and with LQR, it is 113 s approximately, showing better performance in terms of transient and steady-state analysis.
A comparison of the nonlinear control method, Sliding Mode Control (SMC) used in this research, is drawn with [34], in which an SMC controller is designed based on nonlinear transformation to normalize the high blood glucose level for diabetic patients. In this study, the reference value for blood-glucose concentration is taken as 120 mg/dL, which is achieved at around 100 min with the designed SMC (nonlinear transformation) controller showing a very large settling time in terms of time response specifications, as shown in Figure 13 [34]. Simulation results show that the required blood-glucose concentration is still achieved successfully. The reference value for the optimal glucose level, blood glucose for open-loop configuration and the glucose profile using sliding mode control (nonlinear transformation) in closed-loop fashion are plotted. However, the derived control law using SMC in this research work tracks the desired level of glucose for diabetic patients in an acceptable physiological range of (70 mg/dL to 110 mg/dL) in approximately 15 s, demonstrating the superior performance compared to the linear control techniques discussed above and SMC, based on nonlinear transformation as designed in [34]. The bolus dose is the same, i.e., 200 mg/dL in both the cases.

Conclusions
This paper presents control techniques to regulate the glucose levels in patients suffering from diabetes to avoid risks of hyperglycemia and hypoglycemia. The model independent strategy has been considered where the mathematical model describing glucose insulin system was based on experimental data. Discrete time transfer function has been obtained and transformed into continuous domain by the zero-order hold method. Both linear (PID and LQR) and nonlinear schemes (SMC) have been investigated in detail and have been applied on glucose insulin system models. The designed nonlinear control law demonstrated superior performance compared to the linear control techniques in terms of tracking of the desired glucose level (70 mg/dL). Also, the designed first-order SMC was found to yield better results for the estimated model with low sensitivity to plant disturbances and uncertainties. The achieved results are compared with another variant of SMC controller which is based on nonlinear transformation. The derived SMC controller shows better performance in terms of time response parameters. However, chattering in the control input resulted due to the switching action, which is quite evident from the presented simulation results. By applying higher-order SMC techniques along with low-pass filters, chattering can be reduced.

Future Action
In future, artificial intelligence-based controllers can be designed to achieve the desired blood-glucose concentration using a reinforcement learning (RL) algorithm.

Conflicts of Interest:
The authors declare no conflict of interest.