Closed loop control algorithm for an artificial pancreas
11241536 · 2022-02-08
Assignee
Inventors
Cpc classification
A61M5/1723
HUMAN NECESSITIES
A61M2005/1726
HUMAN NECESSITIES
A61B5/14532
HUMAN NECESSITIES
International classification
A61B5/00
HUMAN NECESSITIES
Abstract
The present invention provides a closed loop control method to control an artificial pancreas and the artificial pancreas using this method, comprising constructing an autoregressive model by initiatively introducing the insulin absorption lag factor, calculating an amount of insulin to be delivered at the current time using the autoregressive model and a PID controller respectively, and tuning the parameters of the autoregressive model and the PID controller respectively using the average of the calculation results in order to provide a more accurate prediction of glucose trends and a more desirable amount of insulin delivery.
Claims
1. A method to control an insulin pump responsive to a controller which receives data from a glucose sensor, the method comprising performing the following steps automatically via the controller: receiving a plurality of glucose level measurements from the glucose sensor; calculating an estimated plasma insulin concentration in a blood stream in a body at a predetermined time interval based on an amount of an insulin delivered by the insulin pump, and a lag time from a time of the insulin being delivered to a time of the insulin entering the blood stream; constructing an autoregressive model configured to describe a relationship between the estimated plasma insulin concentration at a time t and a difference between two successive glucose level measurements at the times t and t-k, wherein k is equal to the predetermined time interval; computing a plurality of parameters of the autoregressive model by using a plurality of sets of the estimated plasma insulin concentration and the glucose level measurements at a plurality of times; calculating an amount of insulin to be delivered at a current time using the autoregressive model and a proportional-integral-derivative (PID) controller respectively, wherein the PID controller calculates the amount of insulin to be delivered based on a difference between the glucose level measurement of the current time and a desirable glucose level and a plurality of predetermined gains; tuning the plurality of parameters of the autoregressive model and the plurality of predetermined gains of the PlD controller respectively until calculation results of the amount of insulin to be delivered calculated by using the autoregressive model and the amount of insulin to be delivered calculated by using the PID controller are the same, wherein if the calculation results are not the same, the calculation results of the autoregressive model and the PID controller are replaced by average of the calculation results, respectively, to recompute the plurality of parameters of the autoregressive model and the plurality of predetermined gains of the PID controller; and determining the amount of insulin to be delivered at the current time according to final calculation results from the step of tuning to create a desired future glucose level.
2. The method according to claim 1, wherein the plurality of times comprises a time A and a time B; the autoregressive model comprises relating a blood glucose level of the time B to a plasma insulin of the time A, wherein the insulin delivered at the time A enters the blood stream from the time B.
3. The method according to claim 1, wherein tuning the plurality of parameters of the autoregressive model and the plurality of predetermined gains of the MD controller comprises: comparing the amount of insulin to be delivered calculated by using the autoregressive model to the amount of insulin to be delivered calculated by using the PID controller; and repeating the steps of tuning and comparing until the difference is eliminated.
4. The method according to claim 1, wherein automatically performing the steps in claim 1 for each of a plurality of discrete time intervals with updated sensor measurements via the controller.
5. An artificial pancreas using a dosed loop control, comprising: a) a glucose sensor configured to continually measure respective glucose levels at discrete time intervals and provide respective glucose measurement data; b) an insulin pump configured to deliver insulin in response to a delivery control signal; and c) a controller configured to, for each of a plurality of the discrete time intervals: i) receiving a plurality of glucose level measurements from the glucose sensor; ii) calculating an estimated plasma insulin concentration in a blood stream in a body at a predetermined time interval based on an amount of an insulin delivered by the insulin pump, and a lag time from a time of the insulin being delivered to a time of the insulin entering the blood stream; iii) constructing an autoregressive model configured to describe a relationship between the estimated plasma insulin concentration at a time t and a difference between two glucose level successive measurements at the times t and t-k, wherein k is equal to the predetermined time interval; iv) computing a plurality of parameters of the autoregressive model by using a plurality respective sets of the estimated plasma insulin concentration and the plurality of glucose level measurements at a plurality of times; v) calculating an amount of insulin to be delivered at a current time using the autoregressive model and a proportional-integral-derivative (PID) controller respectively, wherein the PID controller calculates the amount of insulin to be delivered based on a difference between the glucose level measurement of the current time and a desirable glucose level and a plurality of predetermined gains; vi) tuning the plurality of parameters of the autoregressive model and the plurality of predetermined gains of the PID controller respectively until calculation results of the amount of insulin to be delivered calculated by using the autoregressive model and the amount of insulin to be delivered calculated by using the PID controller are the same, wherein if the calculation results are not the same, the calculation results of the autoregressive model and the PID controller are replaced by average of the calculation results, respectively, to recompute the plurality of parameters of the autoregressive model and the plurality of predetermined gains of the PID controller; and vii) determining the amount of insulin to be delivered according to a final calculation result from the tuning step.
6. The artificial pancreas according to claim 5, wherein the controller is one of a processer in the glucose sensor, a processer in the insulin pump, a processer in a handset, or a processing module of a smart device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
DETAILED DESCRIPTION
(5) To make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the embodiments of the present invention are described in the following through specific embodiments.
(6) Referring to
(7)
(8) In other embodiments, the controller can be a processer in the glucose sensor, a processer in the insulin pump, or a processing module of a smart device.
(9) Referring to
(10)
(11) The Autoregressive Model
(12) The method of constructing the autoregressive model is to introduce the insulin absorption delay factor into the conventional glucose-insulin relationship initiatively. Considering the lag time from subcutaneous delivery to appearing in the blood stream, the amount of insulin appearing in the blood stream would not be the same as the amount of insulin delivered, and the estimated plasma insulin can be calculated as:
(13)
(14) Where,
(15) t represents time;
(16) T.sub.0 represents time of insulin absorption delay, 30 minutes in this embodiment;
(17) T.sub.1 represents time of insulin delivery cycle, 15 minutes in this embodiment;
(18) 1 and
2 are time constants (in min) associated with the subcutaneous absorption of insulin;
(19) Kcl represents insulin clearance,
(20) and I.sub.B represents the magnitude of the impulse (bolus) of insulin delivered at time t=0;
(21) I.sub.p(t) represents the estimated plasma insulin concentration at time (t−T.sub.0);
(22) Next, constructing the autoregressive model which can be described as:
Y.sub.t′=kI.sub.p(t)+b
(23) Where,
(24) I.sub.p(t) represents the estimated plasma insulin concentration at time (t−T.sub.0);
(25) Y.sub.t′ represents the difference between two successive glucose measurements;
(26) and k and b are parameters.
(27) In some preferred embodiments, the relationship between the estimated plasma insulin concentration and the difference between two successive measurements of the glucose can be described as the following matrix (the time interval for every update of the sensor measurement is set as 2 minutes in this embodiment):
(28)
Where,
Y.sub.(n) represents the difference between the glucose measurements at t and t minus 2 min;
(29) Y.sub.(n-1) represents the difference between the glucose measurements at t minus 2 min and t minus 4 min;
(30) Y.sub.(n-k) represents the difference between the glucose measurements at t minus 2k min and t minus 2(k+1) min;
(31) C.sub.(n-t) represents the estimated plasma insulin concentration at t;
(32) C.sub.(n-t-1) represents the estimated plasma insulin concentration at t minus 2 min;
(33) C.sub.(n-t-k) represents the estimated plasma insulin concentration at t minus 2k min;
(34) So the values of the parameters k and b can be approached by:
(35)
(36) After obtaining the values of k and b, the desirable future glucose level can be calculated using the autoregressive model. By comparing the estimated future glucose level to the desired glucose level, the insulin amount to be delivered at the current time can be calculated.
(37) In particular embodiments, the difference between the plasma glucose and the insulin concentration is assumed to fit a linear relationship. The following matrix is applied to calculate the parameters k.sub.1, k.sub.2 and b.
(38)
(39) After obtaining the values of k.sub.1, k.sub.2 and b, calculating the amount of insulin to be delivered using the autoregressive model. Then the calculation results from the autoregressive model and the PID algorithm are compared and used to modify the parameters of the PID controller.
(40) The PID Controller
(41) While applying the autoregressive model to calculate the amount of insulin to be delivered at the current time t.sub.0, the controller is also applying a PID algorithm to calculate the amount of insulin to be delivered at the current time t.sub.0 and its simplified model can be described as:
(42)
(43) And in its discrete form:
P(n)=K.sub.p(Y−Y.sub.des)
I(n)=I(n−1)+K.sub.i(Y−Y.sub.des)
(44)
(45) Where,
(46) P(n) is the proportional component of the insulin delivery amount;
(47) I(n) is the integral component of the insulin delivery amount;
(48) D(n) is the derivative component of the insulin delivery amount;
(49) K.sub.p is a proportional gain coefficient;
(50) K.sub.i is an integral gain coefficient;
(51) K.sub.d is a derivative gain coefficient;
(52) Y represents a present glucose level;
(53) Y.sub.des represents a desirable glucose level;
(54) t represents time since last sensor calibration;
(55) I.sub.bas represents a standard daily basal insulin of a particular subject.
(56) U(t) represents the command sent to the insulin pump.
(57) In some embodiments, the proportional gain K.sub.p is determined using the following equation from published literature:
K.sub.p=I.sub.req/135
(58) Where,
(59) I.sub.req represents the daily insulin requirement of a particular subject.
(60) Once K.sub.p is measured, the derivative and integral gains are calculated using ratios. The ratio of K.sub.d/K.sub.p can be set to the dominant time constant for insulin action, ranging from 20-40 minutes and preferably 30 minutes. For instance, calculating K.sub.d given K.sub.p using a time constant of 30 minutes, yields the following relationship:
K.sub.d=30K.sub.p
(61) In a similar fashion, the ratio of K.sub.d/K.sub.i can be set to the average ratio from measurements. In particular embodiments, the insulin amount calculated using the PID controller can be described as:
(62)
K.sub.p=K.sub.d/30 And K.sub.d is calculated using the equation:
(63)
Modification of Parameters of the AR Model and the PID Controller
(64) I.sub.p(t), the calculated insulin amount to be delivered at the current time t.sub.0 using the autoregressive model, and U(t), the calculated insulin amount using PID algorithm are compared, and if the difference is found to be zero, the insulin pump will receive an instruction to deliver the calculated insulin amount.
(65) If the difference between I.sub.p(t) and U(t) is not zero, I.sub.p(t) in the autoregressive model and U(t) in the PID algorithm are replaced with the average of I.sub.p(t) and U(t) to recalculate the parameters k and b in the autoregressive model and K.sub.p, K.sub.i, K.sub.d in the PID algorithm at the same time under the condition of fixing the ratio between K.sub.p and K.sub.d as well as K.sub.i and K.sub.d. Then the I.sub.p(t) and U(t) are calculated again using the autoregressive model with modified parameters k′ and b′ and the PID algorithm with modified coefficients K.sub.p′, K.sub.i′, K.sub.d′, and the steps of comparing, averaging, and replacing the originals with the averages are repeated to recalculate the parameters in the autoregressive model and the PID algorithm respectively until the difference between I.sub.p(t) and U(t) is zero.
(66) When the calculation results of the amount of insulin to be delivered at the current time t.sub.0 from the autoregressive model and the PID algorithm are the same, it can be considered that it is the preferential amount of insulin to be delivered at the current time t.sub.0 to provide a desirable glucose level at time t.sub.2 when the insulin being delivered at the current time t.sub.0 will start to appear in the blood stream at time t.sub.2, so the controller generates a delivery signal commanding the insulin pump to deliver corresponding amount of insulin.
(67) At each and every time when the glucose measurement is updated by the glucose sensor, all the steps identified above are repeated for a new calculation of the insulin delivery amount of the current time.
(68) In other embodiments, all of the parameters K.sub.p, K.sub.i and K.sub.d used in the PID algorithm are estimated. In additional embodiments, one or more parameters are measured, while at least one parameter is estimated from literature.
(69) While at least one exemplary embodiment has been presented in the foregoing detailed description, it should be appreciated that a vast number of variations exist. It should also be appreciated that the exemplary embodiment or embodiments described herein are not intended to limit the scope, applicability, or configuration of the claimed subject matter in any way. Rather, the foregoing detailed description will provide those skilled in the art with a convenient road map for implementing the described embodiment or embodiments. It should be understood that various changes can be made in the function and arrangement of elements without departing from the scope defined by the claims, which includes known equivalents and foreseeable equivalents at the time of filing this patent application.