Next Article in Journal
Design and Analysis of Compliant Rack and Pinion Using Compliant Contact Rolling Joint
Previous Article in Journal
Parametric Study on Performance of Straight Type of Internally Finned Tube
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Automating the Study of a Linearized Model of Diabetes Mellitus and Tuning a PID Controller for This Model †

The Patrice Lumumba Peoples’ Friendship University of Russia, 6 Miklukho-Maklaya St., Moscow 117198, Russia
*
Author to whom correspondence should be addressed.
Presented at the 15th International Conference “Intelligent Systems” (INTELS’22), Moscow, Russia, 14–16 December 2022.
Eng. Proc. 2023, 33(1), 42; https://doi.org/10.3390/engproc2023033042
Published: 27 June 2023
(This article belongs to the Proceedings of 15th International Conference “Intelligent Systems” (INTELS’22))

Abstract

:
This paper proposes a simulation linear model created in the MATLAB environment, which provides a process for regulating blood sugar levels. The controller is built for the need for any type of diabetes to control and normalize the blood sugar content of the patient in order to eliminate the differences in the quality of life of a diabetic patient and a healthy person. The linearization of the nonlinear model was performed, and the adequacy of the linearized model was verified and confirmed using the MATLAB simulation. The choice of the PID controller and the CHR method for its adjustment was justified and MATLAB tools were used to show the implementation of these methods. The model of the patient with the controller has been built; the algorithm for the automatic adjustment of the PID controller parameters has been developed and realized. The directions for continuation of the work on this problem regarding regulation in the system under study are proposed.

1. Introduction

Diabetes mellitus (DM) is a group of metabolic diseases characterized by chronic hyperglycemia, which is the result of impaired insulin secretion, the action of insulin, or both. Chronic hyperglycemia leads to damage and dysfunction of various organs, including the eyes, kidneys, nerves, heart, and blood vessels. In any type of diabetes, the control and normalization of blood sugar becomes one of the main tasks of the patient and his attending physician. When the sugar level is closer to the normal limits, the risk of complications is lower, and there are fewer symptoms of diabetes as well as fewer differences between the quality of life of a patient with diabetes and a healthy person. The current state of medicine and science in general allows the treatment of diabetes mellitus on an outpatient basis, mainly through the use of an individual control system, that is, an insulin pump. The algorithms of such a system can be implemented using a controller.
According to research published in the tenth edition of the Diabetes Atlas of the International Diabetes Federation (IDF), 537 million people aged from 20 to 79 years have diabetes, and this number is steadily increasing every year [1], including in the Russian Federation [2]. This is why the topic of developing new and improving existing automatic control systems for regulating blood sugar levels in patients with diabetes mellitus is becoming increasingly relevant. The aim of the work is the practical implementation of a simulation model in MATLAB for regulating blood sugar levels using an actuator, namely an insulin pump, in order to be able to use this technique when such compact medical devices are put into operation. To achieve this goal, the following tasks were set and solved:
  • Study and analysis of existing mathematical models of diabetes mellitus in terms of applying the methods of the theory of linear automatic control systems to them [3,4,5,6,7,8,9,10,11,12,13,14,15].
  • Analysis of the selected model for the possibility of its linearization [15].
  • Obtaining the transfer functions of the sugar level by food intake and insulin injection, building a mathematical model of the control object (human) in the MATLAB/Simulink environment.
  • Testing of transient graphs of a patient and a healthy person in the original and linearized models during the transient time.
  • Evaluation of the suitability of a linearized model for the development of a PID controller for an insulin pump control system.
  • Study of various engineering methods for the synthesis of controllers and the choice of the most adequate method for the synthesis of the PID controller by the CHR method, taking into account the features of the linearized system.
  • Synthesis of the PID controller by the CHR method.
  • Creation of a control system model with the PID controller in the MATLAB/Simulink environment.
  • Development of an algorithm for determining controller parameters from the transient curve in a model of a patient, with the possibility of automatically adjusting these parameters to obtain a given blood sugar level.
  • Performing simulations with various parameters of the linearized mathematical model to check the operability of this model.

2. Materials and Methods

Rationale for Choosing a Mathematical Model

After the possibility of an external control for blood glucose levels in patients with type I diabetes mellitus by monitoring blood glucose levels and injecting insulin was experimentally proven, it became necessary to develop a safe and effective algorithm for controlling the devices that solve the problem of diabetes for patients. When developing a mathematical model of the interaction between insulin and glucose in the human body, pharmacokinetic and physiological models were considered. The main difference between pharmacokinetic models and physiological ones is that they contain fewer parameters, so they are easier to use for interpreting experimental data. Physiological models are characterized, as a rule, by a large number of parameters. Therefore, Sorensen’s model [8] has 21 states and 22 metabolic functions that describe the dynamics of glucose, insulin, and glucagon. This model is widely used in glucose monitoring and has been criticized for inaccurately representing the observed changes in glucose [9]. Another physiological model, from Kobelli [10], is nonlinear and consists of glucose, insulin, and glucogenic subsystems; it has nine states, 23 metabolic functions, and 46 parameters. Therefore, only some pharmacokinetic models were considered as prototypes for modeling: the Bergman model [11], the Hovorka model [12], and the simplest basic differential mathematical model. The simplest basic differential mathematical model is of the following form:
d x d t = a 1 x y + a 2 ( x 0 x ) + a 3 P ( t ) d y d t = b 1 ( x x 0 ) H ( x x 0 ) b 2 y + b 3 u ( t )
where x ( t ) is the blood sugar level, y ( t ) is the level of insulin in the blood, and x 0 is the fasting blood sugar level. The constants a 1 , a 2 , and a 3 , as well as b 1 , b 2 , and b 3 , are positive and are the sensitivities of the sugar and insulin gradients, respectively. The function H ( x ) is a single step, P ( t ) describes changes in sugar levels from food intake, and u ( t ) describes changes in insulin levels. The undoubted advantages of this model are its simplicity and compactness, consisting in a minimum number of equations and parameters. The adequacy of this model is proved in practice [14]. The model has two input variables, P ( t ) and u ( t ) , and two state variables, x ( t ) and y ( t ) . The state variables are the main variables of the model. They are quantities that uniquely determine the current state of the control object. These variables can be changed (i.e., controlled) in clinical practice. As follows from the equations in (1), the mathematical model is nonlinear. The equations in (1) include the product of the state variables; in both equations, the coefficients on the state variable x depend on this variable, and this dependence is also nonlinear because one of the co-multipliers is a step function. The deviations of the state variables from the initial value (“starvation”) are commensurate with the value itself [14,15] and, therefore, cannot be considered small. In this connection, the decomposition of nonlinear functions into a Taylor series for the purpose of linearization of the object will be ineffective because, to achieve acceptable accuracy, the account of a large number of row members will be required. The attempt to linearize differential equations at steady-state constant values for “hunger” x 0 , y 0 via a Taylor series expansion is impossible because of the infinite derivatives of the step functions H ( x x 0 ) at point x 0 . As stated in [16], for this kind of linearization, the derivatives must have a single and finite value; otherwise, the equation is nonlinearizable. The application of I.A. Vyshnegradsky’s hypothesis for small deviations of all variables from steady-state values seems to be an acceptable method of linearization [16]. The steady-state value is logically considered to be the function of the state variables for a healthy person. The model was linearized by entering a new variable—the deviation of the sugar level from zero, corresponding to hunger:
z = x x 0
and the following matrices of the linear system in the state space were obtained
A = a 2 H ( z ) a 1 x 0 b 1 H ( z ) b 2 ; B = a 3 0 0 b 3 ; C = 1 0 ; D = x 0 .
The transfer function with a second-order characteristic polynomial was derived from the representation in the state space
Z ( s ) = a 1 x 0 b 3 s 2 + b 2 s + a 1 x 0 b 1 U ( s ) + a 3 s + b 2 s 2 + b 2 s + a 1 x 0 b 1 P ( s )
The simulation showed a practical coincidence of the transition functions of the linearized and the original system within two to three hours from the moment of eating (Figure 1), so, the linear model was accepted for further research provided that the maximum of the transition function of the system with the controller is reached at the specified time.
When choosing the controller configuration method, the main preference was given to engineering methods that allow for calculation of the controller parameters based on the characteristics of the transient process graph. To date, the most widespread use is made of PID controllers. Practical experience shows that the use of PID controllers in complex systems (devices) provides a sufficiently small control error and the transition process required by the operating conditions of most control objects. Therefore, the PID regulation will be the priority in the control task under study. Currently, there are quite a lot of different methods for tuning the parameters of PID controllers; still, the most common is the Ziegler–Nichols tuning method [18], proposed by its authors in 1942. This method is simple in application but gives not very good results. As a rule, after setting the regulator parameters, one has to make manual adjustments in order to improve the quality of regulation. Nevertheless, this method is still often used in practice, although many more accurate methods have become available. Ziegler and Nichols proposed two methods for tuning PID regulators [19]. One of them is based on the response parameters of the object to a single jump, and the other is based on the frequency characteristics of the control object. To calculate the PID controller parameters according to the first Ziegler–Nichols method, only two parameters are used: the negative coordinate “a” of the point of intersection of the tangent to the transient curve with the maximum slope, and the coordinate “L” of the point of intersection of the same tangent and the time axis. The formulas for calculating PID controller coefficients are summarized in Table 1.
The Ziegler–Nichols method does not take into account in any way the requirements for the stability margin of the system, which is its significant disadvantage. In addition, the Ziegler–Nichols method gives parameters that are far from optimal. The second Ziegler–Nichols method (the frequency method), as input data for calculations, uses the frequency ω 180 , at which the phase shift in the open circuit reaches 180°, and the modulus of the loop gain at this frequency is K 180 . Knowing the parameter ω 180 , first, find the period of natural oscillations of the system, and then, from Table 1, determine the parameters of the regulator. The accuracy of the controller tuning and the disadvantages of both Ziegler–Nichols methods are the same. The CHR method, which uses a similar method for calculating the parameters of the PID regulator, allows us to bypass the drawbacks of the Ziegler–Nichols method. The authors of this method, Chien, Hrones, and Reswick (CHR) [20], in contrast to Ziegler and Nichols, used the criterion for the maximum slew rate in the absence of overshoot or with no more than 20% overshoot. This criterion gives a larger stability margin than in the Ziegler–Nichols method. The CHR method gives two different systems of regulator parameters. One is obtained by observing the response to the setpoint change (Table 2), and the other is obtained by observing the response to external disturbances (Table 3). Which parameter system to choose depends on what is more important for a particular controller: the quality of control when changing the setpoint or the attenuation of external disturbances. If both are important, it is necessary to use regulators with two degrees of freedom [21].
The CHR method uses an approximation of the object by a first-order delayed model. CHR uses the same initial parameters a and L as the Ziegler–Nichols method. Thus, each system requires a different approach to adjust the controller parameters. A comparative analysis of the methods was carried out, and the CHR method was adopted as providing a better quality of the transient process and a greater margin of stability of the system with a controller compared to the Ziegler–Nichols method. A method was developed for determining the parameters of the PID controller based on a single input variable—the angle of inclination of the tangent to the transient graph. The method was based on the approximation of the transition process graph by a polynomial, followed by analytical differentiation of this polynomial, in order to accurately determine the angle of the tangent. The following algorithm of PID controller tuning was developed:
  • Obtaining a tabular function (graph) of the transient with zero controller settings, with individual parameters a i and b i of the model.
  • Determination of the boundary value a m a x of the regulator.
  • Calculation of the regulator’s coefficients.
  • Calculation of the transient process with the regulator.
  • Comparison of the transient process of step 4 of the algorithm with the transient process of a “healthy person”.
  • If the difference exceeds the admissible one, decrease by ”a” and pass to step 3.
  • Otherwise, the tuning is completed.
Step 2 of the algorithm—the task of tangent construction, or the task of numerical differentiation of a tabularly defined function—requires detailed consideration. The simplest solution to this problem is based on determining the derivative of the function:
y = lim x 0 y x
and uses various finite difference formulas [22]; however, the finite difference method is associated with known difficulties in estimating the error of the result. As stated in [22], the main components of the error of numerical differentiation are the approximation error (also called the truncation error) and rounding errors in computer calculations. The approximation error is determined by the magnitude of the residual term—the difference between the approximated and actual values of the derivative. It is noted in [22] that the analysis of the residual term is nontrivial and that the approximation error tends to decrease as the step x decreases. In contrast to the approximation error, the rounding error increases as the step x decreases. Therefore, the total error of numerical differentiation can decrease as the step decreases only up to some limiting value, after which a further decrease in the step will, at best, not improve the accuracy of the results. In addition, finite difference formulas usually use a constant step, and the resulting simulation function may be a variable step. Optimal accuracy can be achieved by regularizing the numerical differentiation procedure. The simplest way to regularize is to choose a step x such that the inequality is as follows:
| f ( x + h ) f ( x ) | > ε ,
where ε > 0 is some small number. When calculating the derivative, this eliminates the subtraction of closely related numbers, which usually leads to an increase in errors. This is all the more dangerous when subsequently dividing the increment of a function by a small number x . This method cannot be applied to our problem for the reason mentioned above for the variable step x in the original table function.
Another method for regularization is to smooth the tabulated values of the function by selecting some smooth approximating function, for example, a polynomial. Further differentiation of the polynomial using the derivatives table does not present computational difficulties and does not introduce additional errors. This method was used to solve the problem.
The polynomial calculated by the built-in polyfit function will be used as the interpolation polynomial. This choice among many variants [22]—Lagrange, Hermite, and other polynomials—is dictated by the simplest implementation in the program. The transient graph is a fairly smooth curve. By plotting the polynomial trend on this graph, the degree of the polynomial that showed the best coincidence with the graph of the original function was determined. It was found that the polynomial should be of degree 10. This does not exclude a lower degree polynomial; the change in degrees was implemented in the program. The following algorithm was developed to form a set of graph points to build the approximating polynomial:
  • The first point of the set, obviously (0; 0), was marked as “extreme”; the current set length is k = 1.
  • Since the maximum value of the transient function was about 400, we took the value ε = 0.5, which is small enough in comparison with the maximum and simultaneously much larger than the accuracy of calculations in MATLAB (it is equal to the system constant e p s = 2.2204 · 10 16 ) ; in this way, the gross rounding errors were leveled.
  • The “outermost” point of the set was assigned to the current point.
  • We proceed to the next point of the transient table function and check if condition (2) holds.
  • If condition (2) is unfulfilled, then we proceed to item 4.
  • If condition (2) is satisfied, the point was added to the set—it becomes a “last” point, and the length of the set increased by k = k + 1.
  • The condition k = (n + 1) was checked—for the uniqueness of the approximating polynomial the set must contain at least (n + 1) points, where n is the degree of the polynomial.
  • If the condition k = (n + 1) is unfulfilled, pass to item 3.
  • Otherwise, the set is formed—end.
After forming a vector of approximating polynomial coefficients by this set, this vector was transformed into a vector of derivative coefficients according to the following scheme:
p o l y n o m a n a n 1 a 1 a 0 d e r i v a t i v e n a n ( n 1 ) a n 1 1 a 1 0 d e r i v a t i v e n a n ( n 1 ) a n 1 1 a 1
and the value of this derivative y ( 0 ) at the point of food intake point was calculated. Since the food intake point has the coordinates (0;0), the equations of the tangent are as follows:
y ( x ) = y ( 0 ) x
and
a = y ( 0 ) L
The parameter L has a clear biophysical meaning and is the average time elapsed from the beginning of a meal to the feeling of fullness, which is the signal of an increase in blood sugar level because of the digestion of nutrients. The study of this parameter and the scientific substantiation of its value is a topic for a separate study that is beyond the scope of this work, so we took an a priori value of 15 min or
L = 0.25 h .
Each control system requires its own approach for setting the controller parameters. In this case, the setup process is hampered by some factors, namely:
  • Since the PID controller is an external device to the control object, it cannot be implemented in the control object;
  • The food intake and insulin production (or injection) subsystems in the diabetic patient are practically unrelated to each other;
  • The characteristics of each diabetic patient’s model are individual and can vary quite widely.
Considering these factors, the MATLAB/Simulink software package was selected to study the linearized insulin injection control system and test the PID controller tuning algorithm. The development of the model in Simulink is characterized by relative simplicity and clarity, and the management of this model from the Matlab script (m-file) allows for automation of the process of setting model parameters and processing simulation results. In the process of research, it was necessary to take into account a significant variation in the transfer function coefficients of the model. Therefore, the model of diabetes mellitus itself was selected in the mathematical modeling program. Its visual implementation was carried out by means of Simulink. The model is shown in Figure 2. In accordance with the type of transfer function, the model has two channels—one for nutrition and another for insulin injection. The transfer function of each channel is recorded with parametrization through the components of the coefficient vectors a ( i ) and b ( i ) . The PID controller as a block from the Simulink library is included in the feedback loop of the channel for insulin injection. Physically, the PID controller is an insulin pump. The nutrition function according to [4] has the form
P ( t ) = 0 , t < t 0 Q e K ( t t 0 ) , t t 0
where Q is the amount of food, K is a parameter that characterizes the type of sugar that comes with food, and t 0 is the meal time. This function is implemented in the MATLAB function block. The signals from the channel outputs are summed according to the expression for the transfer function Z ( s ) . The transfer to MATLAB of the following simulation results is provided—the model time is represented as t, and the insulin level is represented as y.
The interaction algorithm between the model and the MATLAB script that calls it includes the following steps:
  • Initialization of model parameters—assignment of the specific values for a ( i ) and b ( i ) ;
  • Modeling;
  • Processing of simulation results (vectors [t, y] returned by the model).
Then, steps 1–3 are repeated according to the purpose of the study; i.e., these items are executed the required number of times or until another termination condition is met [17].

3. Results & Discussions

The criterion for completing the adjustment was the specified excess of the maximum insulin level over the level of a healthy person, while the level of a healthy person was calculated by a direct numerical solution of the original nonlinear differential in Equation (1). A number of computational experiments were carried out on the model, as a result of which the limits of changing the parameters of the PID controller were determined:
  • Gain K = 12 … 24;
  • Time constant of the integrator T i = 0.01…0.05 h;
  • Derivation time constant T d = 0.004…0.008 h.
A transient graph with the controller settings K = 18, T i = 0.0333 h, and T d = 0.0058 h, for a patient with an insulin pump (IP), is shown in Figure 3. For comparison, the same graph shows the transition process in the “healthy” model.
As a result of the work completed, the prospects of applying the considered approach to the development of controllers for insulin pumps can be considered confirmed. This is evidenced by the results of modeling and comparing the parameters of the transition process (see Figure 3). The advantage of using a linear model is the simplification of the controller tuning procedure, and linearization allows you to automate this procedure. Thus, it is possible to achieve the dynamics of the blood sugar level of the “patient” to those characteristic of the “healthy”.

4. Conclusions

To sum up, we can say that the goal of regulation set in the work has been achieved—a simulation model has been created in MATLAB as a result of the following stages:
  • Based on the study and analysis of existing mathematical models of diabetes mellitus, in terms of the application (to them) of methods of the theory of linear automatic control systems, a non-linear model was chosen that is consistent with the known physiological facts while having a minimal set of equations and parameters.
  • The selected model, with some assumptions, has been modified and linearized.
  • A mathematical model of the control object (human) was built in the MATLAB/Simulink environment, and, based on the simulation results, a conclusion about the suitability of the linearized model for the development of the PID controller of the insulin pump control system was formed.
  • In the MATLAB/Simulink environment, a model of a control system with a PID controller was built; an algorithm, implemented as an m-file, was created to determine the parameters of the controller; and the adequacy of the algorithm was experimentally verified.
  • The impact of changing the model parameters during the control process was evaluated due to the possible significant variation in these parameters when moving from one patient (digital model) to another.
  • The insignificant influence of sufficiently large deviations of the model parameters on the controller parameters was experimentally established, and a conclusion was formed about the stability of the control object with a PID controller to changes in the parameters of the control object model.
These results suggest the following directions for further research:
  • Improving regulation by introducing a relay element into the control loop that turns off the insulin pump when a certain relatively low sugar level is reached in order to prevent hypoglycemia [5];
  • Study of the system with a regulator with multiple periodic meals to study the effect of breaks between meals;
  • Development of a more convenient interface for the controller parameter setting program.

Author Contributions

Conceptualization, D.A.; Formal analysis, S.K.; Investigation, S.K.; Methodology, D.A.; Project administration, D.A.; Software, S.K.; Validation, D.A.; Visualization, S.K.; Writing—original draft, S.K.; Writing—review and editing, D.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Institutional Review Board (or Ethics Committee) of The Patrice Lumumba Peoples’ Friendship University of Russia (protocol code 200, 2006).

Informed Consent Statement

Written informed consent has been obtained from the patient(s) to publish this paper.

Data Availability Statement

The study did not report any data.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Dedov, I.I.; Shestakova, M.V.; Aleksandrov, A.A.; Galstyan, G.R.; Grigoryan, O.R.; Esayan, R.M.; Kalashnikov, V.Y.; Kuraeva, T.L.; Lipatov, D.V.; Mayorov, A.Y.; et al. Algorithms of Specialized Medical Care for Patients with Diabetes Mellitus: Clinical Guidelines, 10th ed.; Diabetes Mellitus: Moscow, Russia, 2021; 14p. [Google Scholar]
  2. Shapoval, I.N.; Nikitina, S.Y.; Ageeva, L.I. (Eds.) Healthcare in Russia. 2019: Statistical Collection; Rosstat: Moscow, Russia, 2019; 170p. [Google Scholar]
  3. Pfeiffer, E.F.; Thum, C.; Clemens, A.H. The artificial beta cell-a continuous control of blood sugar by external regulation of insulin infusion (glucose-controlled insulin infusion system). Horm. Metab. Res. 1974, 6, 339–342. [Google Scholar] [CrossRef] [PubMed]
  4. Clemens, A.H.; Chang, P.H.; Myers, R.W. The development of Biostator, a glucose controlled insulin infusion system (GCIIS). Horm. Metab. Res. 1977, 7, 23–33. [Google Scholar]
  5. Steil, G.M.; Rebrin, K.; Darwin, C.; Hariri, F.; Saad, M.F. Feasibility of automating insulin delivery for the treatment of type 1 diabetes. Diabetes 2006, 55, 3344–3350. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  6. Davoust, A.; Gavigan, P.; Ruiz-Martin, C.; Trabes, G.; Esf, iari, B.; Wainer, G.; James, J. An architecture for integrating BDI agents with a simulation environment. In Engineering Multi-Agent Systems; Springer International Publishing: Cham, Switzerland, 2020; pp. 67–84. [Google Scholar]
  7. Mikhalsky, A.I.; Novoseltseva, J.A. Modeling of a continuous glycemic curve. In Proceedings of the 12th International Conference “Managing the Development of Large-scale Systems”, Moscow, Russia, 1–3 October 2019; IPU RAS: Moscow, Russia, 2019. [Google Scholar]
  8. Sorensen, J.T. A Physiologic Model of Glucose Metabolism in Man and Its Use to Design and Assess Improve Insulin Therapies for Diabetes. Ph.D. Thesis, Department of Chemical Engineering, MIT, Cambridge, MA, USA, 1985. [Google Scholar]
  9. Steil, G.M.; Clark, B.; Kanderian, S.; Rebrin, K. Modeling insulin action for development of a closed-loop artificial pancreas. Diabetes Technol. Ther. 2005, 7, 94–108. [Google Scholar] [CrossRef] [PubMed]
  10. Cobelli, C.; Federspil, G.; Pacini, G.; Salvan, A.; Scandellari, C. An integrated mathematical model of the dynamics of blood glucose and its hormonal control. Math. Biosci. 1982, 58, 27–60. [Google Scholar] [CrossRef]
  11. Bergman, R.N.; Ider, Y.Z.; Bowden, C.R.; Cobelli, C. Quantitative estimation of insulin sensitivity. Am. J. Physiol. Endocrinol. Metab. 1979, 236, E667. [Google Scholar] [CrossRef] [PubMed]
  12. Hovorka, R.; Canonico, V.; Chassin, L.J.; Haueter, U.; Massi-Benedetti, M.; Federici, M.O.; Pieber, T.R.; Schaller, H.C.; Schaupp, L.; Vering, T.; et al. Nonlinear model predictive control of glucose concentration in subjects with type 1 diabetes. Physiol. Meas. 2004, 25, 905–920. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  13. Doodnath, A.; Kong, A.; Sastry, M.K.S. Optimal Linear Control of Blood Glucose. In Proceedings of the WRI World Congress on Computer Science and Information Engineering 2009, Los Angeles, CA, USA, 31 March–2 April 2009; Volume 5. [Google Scholar]
  14. Davis, M.J. Differential model of diabetes mellitus. In Mathematical Modelling; Andrews, J.G., McLone, R.R., Eds.; Butterworths: London, UK, 1976; Volume 260, pp. 128–139. [Google Scholar]
  15. Kozeko, L.G.; Tsirulyova, V.M.; Shapovalova, I.A. The Study and Numerical Implementation of the Mathematical Model of the Task of Correcting Blood Sugar Levels. Study and Implementation of Numerical Mathematical Model the Task of Adjusting the Level of Sugar in the Blood. TVSU Ser. Chem. 2018, 1, 169–178. [Google Scholar]
  16. Kuropatkin, P.V. Theory of Automatic Control; A Textbook for Electrotechnics Specialties of Universities; Vysshaya Shkola: Moscow, Russia, 1973; 527p. [Google Scholar]
  17. Andrikov, D.A.; Kurbanov, S.V. Development of a Linear Model of Diabetes Mellitus with a PID Controller and a Method for Automatic Adjustment of the PID Controller. In Intelligent Sustainable Systems; Lecture Notes in Networks and Systems; Nagar, A.K., Jat, D.S., Marín-Raventos, G., Mishra, D.K., Eds.; Springer: Singapore, 2022; Volume 333. [Google Scholar]
  18. Denisenko, V.V. PID controllers: Questions of realization the modification no 1. Mod. Autom. Technol. 2008, 4, 86–99. [Google Scholar]
  19. Ziegler, J.G.; Nichols, N.B. Optimum settings for automatic controllers. Trans. ASME 1942, 64, 759–768. [Google Scholar] [CrossRef]
  20. Chien, K.L.; Hrones, J.A.; Reswick, J.B. On automatic control of generalized passive systems. Trans. ASME 1952, 74, 175–185. [Google Scholar] [CrossRef]
  21. Denisenko, V.V. PID controllers: Principles of construction and modification. Mod. Autom. Technol. 2006, 4, 66–74. (In Russian) [Google Scholar]
  22. Turchak, L.I. The Fundamentals of Numerical Methods; Nauka: Moscow, Russia, 1987; 320p. [Google Scholar]
Figure 1. Comparison of transients in the initial (z,y) and linearized ( z 1 , y 1 ) models. The control object is a patient with diabetes mellitus (DM) [17].
Figure 1. Comparison of transients in the initial (z,y) and linearized ( z 1 , y 1 ) models. The control object is a patient with diabetes mellitus (DM) [17].
Engproc 33 00042 g001
Figure 2. Development of a control object model in MATLAB/Simulink [17].
Figure 2. Development of a control object model in MATLAB/Simulink [17].
Engproc 33 00042 g002
Figure 3. Demonstration of transient modeling results [17].
Figure 3. Demonstration of transient modeling results [17].
Engproc 33 00042 g003
Table 1. Formulas for calculating regulator coefficients by the Ziegler–Nichols method.
Table 1. Formulas for calculating regulator coefficients by the Ziegler–Nichols method.
ControllerStep ResponseFrequency Parameters
TypeK T i T d K T i T d
P1/a 0.5/ K 180
PI0.9/a3L/K 0.4/ K 180 0.8 T 180 /K
PID1.2/a0.9L/K0.5L/K0.6/ K 180 0.5 T 180 /K0.125 T 180 /K
Table 2. Formulas for calculating regulator coefficients by CHR method, by response to set point change.
Table 2. Formulas for calculating regulator coefficients by CHR method, by response to set point change.
ControllerNo Overshoot20% Overshoot
TypeK T i T d K T i T d
P0.3/a 0.7/a
PI0.35/a1.2L/K 0.6/a1.0L/K
PID0.6/a1.0L/K0.5L/K0.95/a1.4L/K0.47L/K
Table 3. Formulas for calculating regulator coefficients by CHR method, by response to external perturbations.
Table 3. Formulas for calculating regulator coefficients by CHR method, by response to external perturbations.
ControllerNo Overshoot20% Overshoot
TypeK T i T d K T i T d
P0.3/a 0.7/a
PI0.6/a4L/K 0.7/a2.3L/K
PID0.95/a2.4L/K0.42L/K1.2/a2.0L/K0.42L/K
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Andrikov, D.; Kurbanov, S. Automating the Study of a Linearized Model of Diabetes Mellitus and Tuning a PID Controller for This Model. Eng. Proc. 2023, 33, 42. https://doi.org/10.3390/engproc2023033042

AMA Style

Andrikov D, Kurbanov S. Automating the Study of a Linearized Model of Diabetes Mellitus and Tuning a PID Controller for This Model. Engineering Proceedings. 2023; 33(1):42. https://doi.org/10.3390/engproc2023033042

Chicago/Turabian Style

Andrikov, Denis, and Sinan Kurbanov. 2023. "Automating the Study of a Linearized Model of Diabetes Mellitus and Tuning a PID Controller for This Model" Engineering Proceedings 33, no. 1: 42. https://doi.org/10.3390/engproc2023033042

Article Metrics

Back to TopTop