Artificial pancreas system control method based on interval type-2 and communication optimization and related devices
By optimizing the control method of the artificial pancreas system through interval type II fuzzy modeling and ACK confirmation window mechanism, the nonlinearity and individual variability of the blood glucose-insulin regulation system were solved, the safe infusion of insulin pump and the communication efficiency were improved, and the robustness and resource utilization of the system were enhanced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU UNIVERSITY
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies struggle to accurately describe the nonlinear, time-varying characteristics and individual variability of the glucose-insulin regulation system. Traditional control methods result in insufficient model adaptability and robustness, inadequate consideration of insulin pump infusion rate limitations, low communication efficiency, and increased system power consumption and hardware burden.
The Bergman minimum model is processed using interval type II fuzzy modeling. Combined with the ACK confirmation window mechanism and double Q learning algorithm, a closed-loop control model of the artificial pancreas system is constructed. Considering the saturation characteristics of the insulin pump, the communication load is optimized, and the confirmation window length and sampling interval are adaptively adjusted.
It improves the safety and system resource efficiency of blood glucose regulation, reduces communication frequency and frequent insulin pump operation, and enhances the long-term adaptability and control accuracy of the system.
Smart Images

Figure CN122245796A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology for medical devices, and in particular to a control method and related equipment for an artificial pancreas system based on interval type II and communication optimization. Background Technology
[0002] In physiological modeling, the glucose-insulin regulation system exhibits typical nonlinear and time-varying characteristics, with its dynamic processes influenced by various factors such as dietary intake, individual metabolic differences, and exercise status. Traditional control methods are mostly based on linearized models with fixed parameters, making it difficult to accurately describe real physiological dynamics. Although fuzzy modeling methods have improved the descriptive ability of nonlinear systems to some extent, the fixed membership function of traditional type I fuzzy logic cannot fully characterize the time-varying characteristics of physiological parameters and inter-individual differences, thus limiting the adaptability and robustness of the model in clinical applications. While interval type II fuzzy logic possesses stronger uncertainty representation capabilities, its systematic application in artificial pancreas systems remains relatively insufficient.
[0003] In terms of equipment constraints, insulin pumps have inherent infusion rate limitations, including maximum / minimum infusion rates and infusion rate of change constraints. When control commands exceed the pump's executable range, saturation occurs. Traditional controller designs often ignore this physical limitation, handling it only through simple truncation or limiting, resulting in ineffective execution of insulin infusion commands. This can easily induce adverse effects such as integral saturation, leading to decreased control performance or even instability in the closed-loop system.
[0004] In terms of communication efficiency, existing control architectures mostly employ fixed-period sampling or simple threshold triggering mechanisms, lacking the ability to intelligently perceive the dynamic characteristics of blood glucose. This results in a large amount of redundant communication during relatively stable blood glucose phases, increasing system power consumption and hardware burden; especially when the insulin pump is close to saturation, frequent micro-dose updates not only fail to significantly improve the regulation effect, but may also exacerbate system oscillations. Summary of the Invention
[0005] In view of this, the main objective of the embodiments of the present invention is to provide a control method and related equipment for an artificial pancreas system based on interval type II and communication optimization, in order to solve at least one of the problems of the prior art. The present invention can improve the system resource efficiency and long-term adaptability while ensuring the safety of artificial pancreas system regulation.
[0006] To achieve the above objectives, one aspect of the present invention provides a control method for an artificial pancreas system based on interval type II and communication optimization, the method comprising:
[0007] Based on the state variable samples of the artificial pancreas system, the Bergman minimal model is subjected to interval type II fuzzy modeling to obtain the physiological dynamic model of the artificial pancreas system. Based on the physiological dynamics model and the saturation characteristics of the insulin pump, the initial control command that has not undergone saturation constraint is subjected to saturation constraint processing based on the form of linear principal part plus bounded remainder term, so as to obtain saturation constraint control command; An ACK confirmation window mechanism is constructed; the ACK confirmation window mechanism accumulates multiple control instruction adjustment amounts within the sampling period, and releases the accumulated control instruction adjustment amounts in a bounded manner when the ACK triggering mechanism is met, so as to generate the target control instruction; The preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism are adaptively adjusted using the double-Q learning algorithm to obtain the adjusted confirmation window length and adjusted sampling interval. Based on the physiological dynamics model, the saturation constraint control command, the ACK confirmation window mechanism, the adjusted confirmation window length, and the adjusted sampling interval, a closed-loop system model of the artificial pancreas system is constructed. Based on the dynamically acquired target state variables, the target control command is generated and sent to the insulin pump through the closed-loop system model to achieve control of the artificial pancreas system.
[0008] In some embodiments, the artificial pancreas system control method based on interval type II and communication optimization further includes: Based on Lyapunov stability theory, the performance of the closed-loop system model is analyzed.
[0009] In some embodiments, the step of performing interval type II fuzzy modeling on the Bergman minimal model based on the state variable samples of the artificial pancreas system to obtain the physiological dynamic model of the artificial pancreas system includes the following steps: Based on plasma glucose concentration, basal glucose level, plasma insulin concentration, basal insulin level, and remote insulin action bias, construct the bias state vector of the Bergman minimum model. Based on the aforementioned deviation state vector, equivalent control input, and dietary disturbance, obtain the system vector model; Prerequisite variables were constructed based on plasma glucose concentration deviation and baseline glucose level; The safe change range of the premise variable is fuzzily divided, and multiple interval type II fuzzy sets and the upper and lower membership functions corresponding to the interval type II fuzzy sets are constructed. Based on the interval type-2 fuzzy set and the system vector model, multiple fuzzy rules and local models of the fuzzy rules are established. The upper and lower membership functions are subjected to type dimensionality reduction and normalization to obtain the normalized trigger strength of each fuzzy rule; Based on the normalized trigger intensity, the local model is weighted and fused to obtain the physiological dynamics model.
[0010] In some embodiments, the step of applying saturation constraint processing to the initial control command without saturation constraint based on the physiological dynamics model and the saturation characteristics of the insulin pump, using a linear principal part plus a bounded remainder term, to obtain a saturated constraint control command, includes the following steps: Based on the physiological dynamics model and the deviation state vector at the current moment, the initial control command without saturation constraint is obtained; Based on the saturation characteristics of the insulin pump, obtain the saturation operator; Based on the initial control command and the saturation operator, obtain the first characteristic model of the piecewise saturated nonlinear form of the insulin pump; The first characteristic model is transformed into the form of a linear principal part plus a bounded remainder term to obtain the second characteristic model; Prerequisite variables were constructed based on plasma glucose concentration deviation and baseline glucose level; Based on the aforementioned premise variables and the second characteristic model, a local control law is constructed; The local control law is weighted and fused to obtain the saturation constraint control command.
[0011] In some embodiments, the construction of the ACK confirmation window mechanism includes the following steps: Set the preset confirmation window length and back pressure variable; Get the time interval between the current time and the last time the ACK was sent; The ACK triggering mechanism is constructed based on the preset confirmation window length and the time interval; The nominal adjustment step size is obtained based on the initial control command, the pre-selected nominal input gain, and the actual output of the insulin pump at the previous moment. When the time interval is greater than or equal to the preset confirmation window length, the ACK triggering mechanism is satisfied, the value of the confirmation triggering flag is 1, and the sum of the back pressure variable and the nominal adjustment step size is limited according to the amplitude constraint and the maximum rate of change constraint of the insulin pump to obtain the actual release of the control command adjustment amount. The target control command is generated and sent to the insulin pump based on the adjustment amount of the control command.
[0012] In some embodiments, the adaptive adjustment of the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism using the double-Q learning algorithm to obtain the adjusted confirmation window length and adjusted sampling interval includes the following steps: The plasma glucose concentration deviation at the current moment, the plasma glucose concentration deviation at the previous moment, the preset sampling interval, and the back pressure variable are quantized to obtain a discrete state vector. Multiple candidate confirmation window lengths and multiple candidate sampling intervals are preset; By combining the candidate confirmation window length and the candidate sampling interval, a finite set of actions is obtained; Construct an instantaneous reward function based on the plasma glucose concentration deviation, the target control command, the overhead penalty, and the saturation penalty; Based on the average of the two Q tables and - A greedy strategy is used to select the target action from the finite set of actions; Perform the target action, observe the next discrete state vector, and obtain the reward value according to the instantaneous reward function; Based on the next discrete state vector and the reward value, a Q-table is randomly selected for updating, and the adaptive adjusted confirmation window length and the adjusted sampling interval are output.
[0013] To achieve the above objectives, another aspect of the present invention proposes a control device for an artificial pancreas system based on interval type II and communication optimization, the device comprising: The first module is used to perform interval type II fuzzy modeling processing on the Bergman minimal model based on the state variable samples of the artificial pancreas system to obtain the physiological dynamic model of the artificial pancreas system. The second module is used to perform saturation constraint processing on the initial control command that has not undergone saturation constraint based on the physiological dynamics model and the saturation characteristics of the insulin pump, using the form of linear principal part plus bounded remainder term, to obtain saturation constraint control command; The third module is used to construct an ACK confirmation window mechanism; the ACK confirmation window mechanism accumulates multiple control instruction adjustment amounts within the sampling period, and releases the accumulated control instruction adjustment amounts in a bounded manner when the ACK triggering mechanism is met, so as to generate the target control instruction; The fourth module is used to adaptively adjust the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism using the double Q learning algorithm, so as to obtain the adjusted confirmation window length and adjusted sampling interval. The fifth module is used to construct a closed-loop system model of the artificial pancreas system based on the physiological dynamics model, the saturation constraint control command, the ACK confirmation window mechanism, the adjusted confirmation window length, and the adjusted sampling interval. The sixth module is used to generate and send the target control command to the insulin pump based on the dynamically collected target state variables through the closed-loop system model, thereby realizing the control of the artificial pancreas system.
[0014] To achieve the above objectives, another aspect of the present invention provides an electronic device, the electronic device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described above.
[0015] To achieve the above objectives, another aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.
[0016] To achieve the above objectives, another aspect of the present invention provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions to cause the computer device to perform the aforementioned method.
[0017] The embodiments of the present invention include at least the following beneficial effects: The present invention provides a control method and related equipment for an artificial pancreas system based on interval type II and communication optimization. This scheme performs interval type II fuzzy modeling on the Bergman minimum model based on the state variable samples of the artificial pancreas system to obtain a physiological dynamic model of the artificial pancreas system, improving the model's nonlinear description ability and robustness to complex glucose-insulin dynamics. Based on the physiological dynamic model and the saturation characteristics of the insulin pump, saturation constraint processing is performed on the initial control commands that have not undergone saturation constraint based on the form of linear principal part plus bounded remainder term, resulting in saturated constraint control commands, ensuring the safe boundary of the infusion rate. An ACK confirmation window mechanism is constructed; the ACK confirmation window mechanism accumulates the adjustment amounts of multiple control commands within the sampling period, and when the ACK trigger mechanism is satisfied, the accumulated control command adjustment amounts are released in a bounded manner to generate the target. Control commands can reduce communication frequency and the frequent operation of the insulin pump. Through a double-Q learning algorithm, the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism are adaptively adjusted to obtain the adjusted confirmation window length and sampling interval. This dynamically balances control accuracy and communication / computation resource consumption while ensuring control performance. Based on a physiological dynamics model, saturation-constrained control commands, the ACK confirmation window mechanism, the adjusted confirmation window length, and the adjusted sampling interval, a closed-loop system model of the artificial pancreas system is constructed, integrating a complete control framework of fuzzy modeling, saturation constraint processing, communication optimization, and adaptive strategies. Based on dynamically acquired target state variables, target control commands are generated and sent to the insulin pump through the closed-loop system model to achieve control of the artificial pancreas system. This ensures the safety of the artificial pancreas system's regulation while improving system resource efficiency and long-term adaptability. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of the artificial pancreas system control method based on interval type II and communication optimization provided in the embodiments of the present invention; Figure 2 This is a curve showing the occurrence rate of exogenous glucose in a typical dietary scenario provided in this embodiment of the invention; Figure 3a , Figure 3b and Figure 3c This is a comparison chart of intraday blood glucose concentration changes under three fixed infusion strategies provided in this embodiment of the invention; Figure 4 This is a schematic diagram of the plasma glucose trajectory under the combined effect of ACK window optimization and pump saturation constraint provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the insulin infusion rate curve corresponding to the fixed infusion strategy provided in the embodiments of the present invention; Figure 6 This is a schematic diagram of the evolution curve of the window length over time under the ACK confirmation window mechanism provided in an embodiment of the present invention; Figure 7 This is a schematic diagram illustrating the adaptive variation characteristics of the ACK confirmation window under different blood glucose fluctuation levels provided in this embodiment of the invention; Figure 8 This is a schematic diagram illustrating the change of cumulative reward over time under the dual-Q learning framework provided in this embodiment of the invention; Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this invention; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this invention as detailed in the appended claims.
[0021] It should be noted that although functional modules are divided in the system diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100" and "second / S200" in the specification, claims, and the foregoing drawings may be used herein to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another. For example, first information may also be referred to as second information without departing from the scope of the embodiments of the invention, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "when" as used herein may be interpreted as "when," "in response to a determination," or "in the event of a determination."
[0022] The terms “at least one,” “multiple,” “each,” “any,” etc., used in this invention, “at least one” includes one, two, or more than two; “multiple” includes two or more than two; “each” refers to each of the corresponding multiple; and “any” refers to any one of the multiple.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0024] Before providing a detailed description of the embodiments of the present invention, some of the nouns and terms involved in the embodiments of the present invention will be explained first. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0025] The Bergman Minimal Model is a simple and effective model for describing the glucose-insulin regulatory system. It is used to analyze the effects of insulin sensitivity on glucose tolerance and diabetes risk, as well as the role of insulin secretion.
[0026] An acknowledgment character (ACK) indicates that the received data has been acknowledged and that it was received correctly. In data communication, ACK signifies that the receiver has successfully received the data and is typically used to confirm the transmission of data.
[0027] An artificial pancreas system (APS) is a system that automatically maintains blood sugar levels within healthy limits.
[0028] In related technologies, existing APS suffers from problems such as low blood glucose regulation accuracy, high risk of hyperglycemia and hypoglycemia, performance degradation due to pump saturation, and excessive communication load under complex operating conditions such as high noise and significant lag in continuous blood glucose monitoring, significant individual differences among patients, severe postprandial exogenous disturbances, easy saturation of insulin pumps, and limited network bandwidth.
[0029] In view of this, this invention provides a control method and related equipment for an artificial pancreas system based on interval type II and communication optimization. This scheme constructs a physiological dynamic model of the glucose-insulin dynamic relationship with uncertainty description capability, designs a controller structure that considers pump saturation constraints, introduces an ACK confirmation window mechanism to optimize communication load, and uses reinforcement learning algorithms (such as the double Q learning algorithm) to achieve dynamic adaptation of window parameters. Ultimately, while ensuring the safety of blood glucose regulation, it significantly improves the system resource efficiency and long-term adaptability.
[0030] Figure 1 This is an optional flowchart of an artificial pancreas system control method based on interval type II and communication optimization provided in an embodiment of the present invention. Figure 1 The method may include, but is not limited to, steps S100 to S600: Step S100: Based on the state variable samples of the artificial pancreas system, perform interval type II fuzzy modeling on the Bergman minimal model to obtain the physiological dynamic model of the artificial pancreas system. Step S200: Based on the physiological dynamics model and the saturation characteristics of the insulin pump, the initial control command that has not undergone saturation constraint is subjected to saturation constraint processing based on the form of linear principal part plus bounded remainder term, so as to obtain saturation constraint control command; Step S300: Construct an ACK confirmation window mechanism; The ACK confirmation window mechanism accumulates the adjustment amounts of multiple control commands within the sampling period, and releases the accumulated control command adjustment amounts in a bounded manner when the ACK triggering mechanism is met, so as to generate the target control command. Step S400: Using the double-Q learning algorithm, the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism are adaptively adjusted to obtain the adjusted confirmation window length and adjusted sampling interval. Step S500: Based on the physiological dynamics model, saturation constraint control command, ACK confirmation window mechanism, adjusted confirmation window length, and adjusted sampling interval, a closed-loop system model of the artificial pancreas system is constructed. In step S600, based on the dynamically acquired target state variables, a target control command is generated and sent to the insulin pump through a closed-loop system model to achieve control of the artificial pancreas system.
[0031] In step S100 of some embodiments, an APS physiological dynamics model based on interval type-II fuzzy logic is established. While maintaining the structural simplicity of the Bergman model, the footprint uncertainty of interval type-II fuzzy sets is introduced, effectively capturing the nonlinearity, physiological parameter perturbations, and individual differences in the blood glucose-insulin regulation process, providing a unified system modeling foundation for subsequent pump saturation constraint modeling, confirmation window design, and safety control law solution.
[0032] In some embodiments, step S100 may include, but is not limited to, steps S110 to S170: Step S110: Construct the bias state vector of the Bergman minimum model based on plasma glucose concentration, basal glucose level, plasma insulin concentration, basal insulin level, and remote insulin action bias. Step S120: Obtain the system vector model based on the deviation state vector, equivalent control input, and dietary disturbance; Step S130: Construct prerequisite variables based on plasma glucose concentration deviation and baseline glucose level; Step S140: Fuzzy partition the safe change range of the premise variable, and construct multiple interval type II fuzzy sets and the upper and lower membership functions corresponding to the interval type II fuzzy sets. Step S150: Based on the interval type II fuzzy set and the system vector model, establish multiple fuzzy rules and local models of the fuzzy rules; Step S160: Perform type dimensionality reduction and normalization on the upper and lower membership functions to obtain the normalized triggering intensity of each fuzzy rule; Step S170: Based on the normalized trigger intensity, the local model is weighted and fused to obtain the physiological dynamics model.
[0033] In step S110 of some embodiments, a third-order nonlinear system describing the dynamic relationship between glucose and insulin is established based on the Bergman minimal model. The system state variable samples may include, but are not limited to, plasma glucose concentration deviation, plasma insulin concentration deviation, and remote insulin action deviation. The differential equation of the third-order nonlinear system describing the dynamic relationship between glucose and insulin is as follows: (1) In the formula, , , , , For each physiological parameter; Indicates glucose efficacy; Indicates the remote insulin decay coefficient; This represents the gain coefficient of insulin's long-range effect; Indicates the rate of insulin clearance; Indicates the volume of distribution of insulin; Indicates in The rate of change of plasma glucose concentration deviation at any given time; This indicates a deviation in plasma glucose concentration; Indicates basal glucose level; This indicates a deviation in the action of insulin at long distances; Indicates dietary disturbance; Indicates in The rate of change of plasma insulin concentration deviation at any given time; This indicates a deviation in plasma insulin concentration; Indicates basal insulin level; This indicates the actual infusion rate of the insulin pump; Indicates in The rate of change in remote insulin action deviation over time. Optionally, the above parameters can be set according to the physiological characteristics of a typical type 1 diabetic patient.
[0034] To facilitate subsequent controller design, based on plasma glucose concentration values... and basal glucose levels Define plasma glucose concentration deviation Based on plasma insulin concentration values and basal insulin levels Define plasma insulin concentration deviation Based on plasma glucose concentration deviation Plasma insulin concentration deviation and remote insulin action deviation It is possible to construct the bias state vector of the Bergman minimum model. The expression is: .in, This indicates the transpose operation.
[0035] In some embodiments, based on the deviation state vector, equivalent control input, and dietary disturbance, the system can be rewritten in a compact vector form using equation (1), resulting in the following system vector model: (2) In the formula, , , This represents a system matrix uniquely determined by physiological parameters; This represents the equivalent control input, which is the insulin infusion rate signal that is actually applied to the system after being generated by the controller, subjected to saturation constraints and zero-order hold. Represents the deviation state vector in time The derivative of .
[0036] In step S130 of some embodiments, an auxiliary variable is introduced based on the plasma glucose concentration deviation and the baseline glucose level. ,Will This serves as a prerequisite variable for fuzzy modeling. The range of variation for this prerequisite variable is limited to the safe blood glucose variation range. Internal (e.g., 60–120 mg / dL).
[0037] In steps S140 to S150 of some embodiments, the safe variation range is determined based on the influence of different blood glucose levels on system dynamics. Perform fuzzy partitioning, dividing the data into several overlapping sub-intervals, and construct corresponding sub-intervals. A fuzzy set of premises To characterize the parameter uncertainty and inter-individual differences in the modeling process, a fuzzy set of premises is used for each premise. Construct interval type II fuzzy sets. The upper and lower membership functions corresponding to the interval type II fuzzy sets include the lower bound membership function. Upper bound membership function This is used to describe the uncertainty caused by the boundaries of blood glucose intervals and parameter drift. Based on this, an interval type II fuzzy model is established. The fuzzy rule is expressed as follows: rule :if yes Then the local model with fuzzy rules is: (3) In the formula, , , and For the corresponding to the first Local linear model matrix for each blood glucose interval; Indicates system output; The full-state vector is defined as follows: This includes the actual values of plasma glucose concentration, plasma insulin concentration, and remote insulin action.
[0038] Among them, for the input , No. The excitation intensity of a fuzzy rule is represented by the membership interval formed by the upper and lower membership functions as follows: (4) In the formula, Indicates the first The membership interval of a fuzzy rule; Indicates the first The lower bound membership function of a fuzzy rule; Indicates the first The upper bound membership function of a fuzzy rule.
[0039] In step S160 of some embodiments, in order to obtain scalar weights that can be used for weighted summation, a scalar weight satisfying the following condition is introduced: The weighting factor is used to compress the membership interval in equation (4) into a scalar membership degree through type dimensionality reduction and normalization, as shown in the following expression: (5) In the formula, Indicates the first Normalized trigger strength of a fuzzy rule; Indicates the first The lower bound of the excitation intensity of a fuzzy rule; Indicates the first An upper bound on the excitation intensity of a fuzzy rule; Represents the first dimensionality reduction used for type reduction The weighting factor of a fuzzy rule; Represents the first dimensionality reduction used for type reduction The weighting factor of the fuzzy rule; Indicates the first The weighted excitation intensity of a fuzzy rule; Indicates the first The weighted excitation intensity of a fuzzy rule; Represents the total number of fuzzy rules; The index representing the fuzzy rule.
[0040] In step S170 of some embodiments, according to the first The normalized trigger intensity of the fuzzy rules is used to perform weighted fusion processing on the local models. For example, Equations (3) and (5) are used to perform weighted fusion on each local model to obtain the overall interval type II fuzzy APS physiological dynamics model: (6) In step S200 of some embodiments, to prevent the insulin pump from reaching its physical limits due to excessively large or small commands during actual operation, which could lead to performance degradation or even "integral saturation," this embodiment of the invention designs a controller structure that considers pump saturation constraints within a sampling framework, and models the saturation characteristics using a linear principal component plus bounded remainder term (LPBR). While ensuring the accuracy of blood glucose regulation, the controller strictly limits the insulin pump output within a clinically safe range, effectively suppressing performance degradation and oscillations caused by pump saturation, and providing a feasible control law description basis for subsequent ACK confirmation window mechanisms and stability analysis.
[0041] In some embodiments, step S200 may include, but is not limited to, steps S210 to S270: Step S210: Based on the physiological dynamics model and the deviation state vector at the current moment, obtain the initial control command without saturation constraint; Step S220: Obtain the saturation operator based on the saturation characteristics of the insulin pump; Step S230: Based on the initial control command and the saturation operator, obtain the first characteristic model of the piecewise saturated nonlinear form of the insulin pump. Step S240: Transform the first characteristic model into the form of a linear principal part plus a bounded remainder term to obtain the second characteristic model; Step S250: Construct prerequisite variables based on plasma glucose concentration deviation and baseline glucose level; Step S260: Construct the local control law based on the premise variables and the second characteristic model; Step S270: Perform weighted fusion processing on the local control laws to obtain saturated constraint control commands.
[0042] In step S210 of some embodiments, the closed-loop control is set at a strictly incremental set of sampling times. Updated above, defining the first Each sampling interval is And constrain it to be within the allowable range. This is to ensure the physiological rationality of the control update frequency and the controllability of communication overhead. At each sampling time... Based on the physiological dynamics model of the artificial pancreas system and the current moment Deviation state vector First, generate initial control commands that have not undergone saturation constraints. And then feed it into the insulin pump.
[0043] In step S220 of some embodiments, considering the saturation characteristics of the insulin pump with a lower limit and a safe upper limit for basal infusion, the saturation operator of the pump output is defined as: (7) In the formula, Indicates the saturation operator; Indicates the lower bound of the basic input; The upper limit of the maximum infusion is determined by both clinical safety and hardware capabilities. Indicates an intermediate variable.
[0044] In step S230 of some embodiments, the equivalent control input of the actual pump adopts a zero-order hold mode in the range With the internal parameters remaining unchanged, and combining the initial control commands and the saturation operator, the first characteristic model of the piecewise saturated nonlinear form of the insulin pump is as follows: (8) In the formula, Indicates the equivalent control input; Indicates the first The control commands actually applied to the insulin pump at that moment.
[0045] In step S240 of some embodiments, to facilitate subsequent stability analysis and controller parameter tuning, the piecewise saturated nonlinear form of the first characteristic model is further equivalent to the form of "linear principal part + bounded remainder term", that is, the second characteristic model used at the update time is: (9) In the formula, This indicates the pre-selected nominal input gain; This represents the remainder function introduced by the saturation effect, and satisfies the unified boundedness constraint within the working interval of interest. .
[0046] By using this linear principal term plus bounded remainder, it is possible to ensure that the pump output always falls within the bounded remainder term. Under the premise of the interval, the saturated nonlinear constraint is transformed into a linear structure with bounded uncertainty terms, which facilitates subsequent analysis and design in combination with Lyapunov–Krasovskii functionals (LKFs) and linear matrix inequalities (LMIs).
[0047] In some embodiments, step S250 is described with reference to the embodiment of step S130 described above, and will not be repeated here.
[0048] In step S260 of some embodiments, in order to simultaneously characterize the nonlinearity and parameter uncertainty in the artificial pancreas system, an interval type-II fuzzy control law is constructed within the LPBR framework. For example, in each... Under the fuzzy rule, the current variable is... When the set belongs to the corresponding fuzzy set, the local control law adopts the following rules: rule :if yes ,So: (10) In the formula, Indicates the first The local feedback gain matrix corresponding to each rule.
[0049] In some embodiments, for the input , No. The excitation intensity of a rule is represented by the membership interval formed by the upper and lower membership functions as follows: In the formula, Indicates the first The membership interval of a fuzzy rule; Indicates the first The lower bound membership function of a fuzzy rule; Indicates the first The upper bound membership function of the fuzzy rules. To obtain scalar weights that can be used for weighted summation, a function satisfying... The weighting factors are processed by type dimensionality reduction and normalization to reduce the weighting factor of the first element. The membership interval of the fuzzy rule is compressed into a scalar membership degree, resulting in the th rule. The normalized trigger strength of the fuzzy rule is expressed as: ; In the formula, Indicates the first Normalized trigger strength of a fuzzy rule; Indicates the first The lower bound of the excitation intensity of a fuzzy rule; Indicates the first An upper bound on the excitation intensity of a fuzzy rule; Represents the first dimensionality reduction used for type reduction The weighting factor of a fuzzy rule; Represents the first dimensionality reduction used for type reduction The weighting factor of the fuzzy rule; Indicates the first The weighted excitation intensity of a fuzzy rule.
[0050] In step S270 of some embodiments, the first... The normalized trigger strength of the fuzzy rule, for the th At that moment The local control laws are weighted and fused to obtain the global control input (i.e., the saturation constraint control command), as shown in the following expression: (11) In the formula, Indicates the first At the [time]th moment Normalized trigger strength of a fuzzy rule; Indicates the first The control command actually applied to the insulin pump at that moment is a saturation-constrained control command.
[0051] In step S300 of some embodiments, to further reduce communication load and avoid frequent fine-tuning near saturation, an ACK confirmation window mechanism is established between the controller and the insulin pump. By merging and boundedly releasing multiple update requests, "packet confirmation" and smooth execution of pump-side commands are achieved. Furthermore, by introducing an ACK confirmation window and back pressure management mechanism between the controller and the insulin pump, a command management strategy of "multiple requests, single confirmation, and restricted release" is implemented. This significantly reduces communication load while ensuring the safety of blood glucose control, avoids frequent updates in saturation states, and alleviates the burden on pump execution.
[0052] In some embodiments, step S300 may include, but is not limited to, steps S310 to S360: Step S310: Set the preset confirmation window length and back pressure variable; Step S320: Obtain the time interval between the current time and the last time the ACK was sent; Step S330: Construct an ACK triggering mechanism based on the preset confirmation window length and time interval; Step S340: Obtain the nominal adjustment step size based on the initial control command, the pre-selected nominal input gain, and the actual output of the insulin pump at the previous moment; Step S350: When the time interval is greater than or equal to the preset confirmation window length, the ACK trigger mechanism is satisfied, the value of the confirmation trigger flag is 1, and the sum of the back pressure variable and the nominal adjustment step size is limited according to the amplitude constraint and the maximum rate of change constraint of the insulin pump to obtain the actual release control command adjustment amount. Step S360: Adjust the amount according to the control command and generate the target control command to be sent to the insulin pump.
[0053] In step S310 of some embodiments, firstly, a preset acknowledgment window length for ACK is introduced. Secondly, to characterize the amount of unexecuted adjustments accumulated due to ACK delays, a backpressure variable is introduced. .
[0054] In steps S320 to S330 of some embodiments, at each sampling time Define a binary variable This indicates whether to send an ACK at that moment. If the most recent (previous) ACK was sent, then the ACK trigger mechanism is set to: only when the current time... An ACK is sent only if the time interval since the most recent ACK transmission is not less than the preset acknowledgment window length. (12) In the formula, It is a binary variable representing the confirmation trigger flag; This is an indicator function.
[0055] The ACK triggering mechanism ensures a minimum time interval between ACKs, thereby automatically lengthening the instruction confirmation cycle when blood sugar is relatively stable or the pump is near saturation for a long time, reducing unnecessary communication and pump execution actions.
[0056] In step S340 of some embodiments, the nominal adjustment step size is obtained based on the initial control command, the pre-selected nominal input gain, and the actual output of the insulin pump at the previous moment. The formula used is: (13) In the formula, Indicates the nominal adjustment step size; This indicates the actual output of the insulin pump at the previous moment.
[0057] In some embodiments, the back pressure variable is updated as follows: (14) In the formula, Indicates the first Back pressure variable at each moment; Indicates the first Back pressure variable at each moment; Indicates the first The nominal adjustment step size at each moment; Indicates the first The combined adjustment amount actually released to the insulin pump when the ACK is triggered.
[0058] In step S350 of some embodiments, when the time interval is less than the preset confirmation window length, ,make This indicates that only the request is recorded this time, and no actual adjustments are made to the pump; that is, only the nominal adjustment step size is accumulated. Without altering the pump output, the ACK trigger mechanism is satisfied when the time interval is greater than or equal to the preset acknowledgment window length, and the acknowledgment trigger flag is activated. The accumulated control command adjustment amount is released all at once in a limited manner, thereby merging multiple update requests into a single bounded correction.
[0059] In addition, to ensure that the released correction amount does not violate the pump's amplitude and rate of change constraints, in each Define the magnitude margin relative to the current infusion rate: (15) In the formula, Indicates the minimum safe infusion rate of the insulin pump; This indicates the maximum safe infusion rate of the insulin pump; This indicates the current allowed downward adjustment margin; This indicates the current allowable upward adjustment margin. It is combined with the maximum allowable rate of change. Constraints and Allowable Sampling Intervals When ACK is triggered, the amplitude projection and rate of change limit of the control command adjustment amount for merging are applied to obtain: (16) In the formula, Indicates the first The combined adjustment amount actually released to the insulin pump when the ACK is triggered; This represents a limiting function, whose function is to limit the input variable. Restricted to the lower bound With the upper realm between.
[0060] In step S360 of some embodiments, the pump output is updated according to the actual released combined control command adjustment amount to generate the final target control command sent to the insulin pump.
[0061] In step S400 of some embodiments, based on the ACK confirmation window and sampling mechanism, in order to automatically balance blood glucose control performance and communication / execution overhead under different operating conditions, double Q learning is introduced to adaptively adjust the confirmation window length and sampling interval.
[0062] In some embodiments, step S400 may include, but is not limited to, steps S410 to S470: Step S410: Quantize the plasma glucose concentration deviation at the current moment, the plasma glucose concentration deviation at the previous moment, the preset sampling interval, and the back pressure variable to obtain a discrete state vector. Step S420: Preset multiple candidate confirmation window lengths and multiple candidate sampling intervals; Step S430: Combine the candidate confirmation window length and the candidate sampling interval to obtain a finite set of actions; Step S440: Construct an instant reward function based on plasma glucose concentration deviation, target control command, overhead penalty, and saturation penalty; Step S450, based on the average of the two Q tables and - Greedy strategy: Select the target action from a finite set of actions; Step S460: Execute the target action, observe the next discrete state vector, and obtain the reward value according to the instant reward function; Step S470: Based on the next discrete state vector and the reward value, randomly select a Q-table for updating, and output the adaptive adjusted confirmation window length and the adjusted sampling interval.
[0063] In step S410 of some embodiments, the current operating state of the APS is quantized into a finite number of discrete states. For example, taking the first... Taking a sampling time as an example, construct a discrete state vector: (17) In the formula, Represents a discrete state vector; Indicates deviation in plasma glucose concentration Quantification level; Indicates the change in blood glucose level The quantification level, where the deviation of plasma glucose concentration at the current moment. Subtract the plasma glucose concentration deviation from the previous moment The change in blood glucose level can be obtained; Represents back pressure variable Quantification level; Indicates the current sampling interval The level to which it belongs. Each quantization operator is mapped to a finite set of labels through segmented intervals, thus forming a finite set of states.
[0064] In steps S420 to S430 of some embodiments, the confirmation window lengths and sampling intervals of several candidates are given in advance. Optionally, the following can be included: (18) In the formula, The total number of candidates, which is the length of the candidate confirmation window; The total number of candidates for the candidate sampling interval.
[0065] The candidate confirmation window length and candidate sampling interval are combined into a finite set of actions. Each action corresponds to a pair In state Selecting different actions below means using different confirmation windows and sampling strategies.
[0066] In step S440 of some embodiments, to balance control accuracy and resource utilization, an instantaneous reward function is introduced based on plasma glucose concentration deviation, target control command, overhead penalty, and saturation penalty. The formula used includes: (19) In the formula, Indicates the return value; , , , This represents the weighting coefficients, all of which are greater than zero. This indicates the overhead penalty triggered by communication or ACK in this cycle; This represents the saturation penalty when the pump output approaches saturation. By adjusting various weighting coefficients, a comprehensive trade-off can be achieved for blood glucose deviation, control energy, and communication frequency.
[0067] In steps S450 to S470 of some embodiments, a double-Q learning strategy is used to maintain two images respectively. surface and Within each sampling period, according to - Greedy strategy based on two cards The average value of the table, from the action set Select target action Execute the selected target action. The next discrete state vector obtained from observation and return value Randomly select one The table is updated, for example, updating... hour: (20) In the formula, Representation Table In state and actions Q-value estimation under the following conditions; Representation Table In the next state and greedy actions Q-value estimation under the following conditions ; Representation Table In the next state and actions Q-value estimation under the following conditions; The learning rate; This is the discount factor.
[0068] Another one surface The update method is similar, and its update formula is: ; In the formula, Representation Table In state and actions Q-value estimation under the following conditions; Representation Table In the next state and greedy actions Q-value estimation under the following conditions ; Representation Table In the next state and actions Q-value estimation under the given conditions.
[0069] As the program runs, the dual-Q learning module can gradually learn to approach optimal levels under different blood glucose conditions. The selected strategy serves as the adjusted confirmation window length and the adjusted sampling interval, enabling the system to automatically shorten the confirmation window and sampling interval when blood glucose levels fluctuate significantly, and automatically extend them when blood glucose levels are stable. This significantly reduces communication and execution burden while ensuring control performance.
[0070] In step S500 of some embodiments, based on the physiological dynamics model, saturation constraint control command, ACK confirmation window mechanism, adaptively adjusted confirmation window length, and adaptively adjusted sampling interval, a closed-loop system model of the artificial pancreas system can be formed. This closed-loop system model is represented as follows: (twenty one) In the formula, Represents the deviation state vector in time The derivative; Indicates the first Normalized trigger strength of a fuzzy rule; Indicates the first At the [time]th moment Normalized trigger strength of a fuzzy rule; Represents the total number of fuzzy rules; , , Indicates corresponding to the first Local linear model matrix for each blood glucose interval; Represents the deviation state vector; This indicates the pre-selected nominal input gain; Indicates the first The local feedback gain matrix corresponding to each rule; Indicates the first The deviation state vector at each moment; This represents the residual function introduced by the saturation effect; This indicates dietary disturbance.
[0071] In step S600 of some embodiments, the system dynamically collects real-time physiological state variables of the target object, especially plasma glucose concentration values, through devices such as continuous glucose monitoring sensors, and calculates a deviation state vector based on this. This vector is input into a pre-constructed closed-loop system model, where an interval type II fuzzy controller calculates an initial control command without saturation constraints based on the current state. Subsequently, the command is saturated by adding a bounded remainder term to a linear principal component, generating a saturated constraint control command that conforms to the physical safety boundary of the insulin pump. This command, together with the current output of the pump, is input to the ACK confirmation window mechanism, which combines real-time back pressure variables and a confirmation window dynamically optimized through double Q learning. The system determines whether to release the command within the current cycle based on the port length and current triggering conditions. It then performs bounded merging of the amplitude and rate of change of the cumulative adjustment, ultimately generating a safe-to-execute target control command. This command is sent to the insulin pump drive mechanism via the communication interface to achieve precise adjustment of the insulin infusion rate, thereby completing closed-loop control of blood glucose levels. Simultaneously, the dual-Q learning algorithm calculates the reward value based on the real-time collected system status, control effect, and resource consumption, updates its decision table online, and dynamically outputs optimized confirmation window length and sampling interval parameters. This allows the system to maintain control accuracy while adaptively balancing communication load and execution frequency, achieving continuous, autonomous, and safe blood glucose management.
[0072] In some embodiments, a performance analysis of an artificial pancreas closed-loop system based on interval type-II fuzzy modeling, pump-constrained safety control, and an ACK confirmation window mechanism is conducted using Lyapunov stability theory. To ensure the safe and stable operation of the system under the combined effects of model uncertainty, sample-and-hold, and time-varying mechanisms such as the confirmation window, this embodiment presents two key theorems: Theorem 1, based on LKFs, derives a set of criteria in the form of linear matrix inequalities as sufficient conditions to guarantee the asymptotic stability of the closed-loop APS and satisfy preset performance indicators; Theorem 2 further explains how to recover the fuzzy controller feedback gain and related parameters from the feasible solutions of this set of linear matrix inequalities, providing a specific and feasible design method for parameter tuning and engineering implementation of the actual artificial pancreas controller.
[0073] Theorem 1: In the APS closed-loop model described by formula (21), at the sampling interval and controller feedback gain matrix Given the condition, if there exists a symmetric positive definite matrix , and a real matrix of appropriate dimension. , , , , , , , If the conditions for LMIs given later are satisfied simultaneously, then the system can be guaranteed to be asymptotically stable and satisfy the following conditions. Performance indicators .
[0074] , (twenty two) in: ; ; ; ; ; ; ; ; ; ; ; ; ; , ; ; ; ; ; ; ; ; ; ; ; ; ; ; , .
[0075] To analyze and guarantee the asymptotic stability of APS, the following LKFs are first constructed: (twenty three) in, ; ; ; The designed LKFs consist of several subfunctionals, which characterize the system's sampling state, state evolution within the sampling interval, and state derivatives, respectively. Their time derivatives can be further derived as follows: (twenty four) Therefore, when the LMIs condition given by formula (22) holds, the derivative of LKFs satisfies the condition in the absence of external disturbances. This ensures the asymptotic stability of the closed-loop system.
[0076] Furthermore, considering external disturbance signals, integrating the above derivative inequality over the interval yields: (25) Given initial conditions, it can be deduced that the system output satisfies the preset performance constraints. This shows that when the LMIs conditions are met, the system is not only asymptotically stable, but also achieves the predetermined performance indicators.
[0077] Theorem 2: In the APS closed-loop model described by formula (21), at the sampling interval Given the condition, if there exists a symmetric positive definite matrix , and a real matrix of appropriate dimension. , , , , , , , If the conditions for LMIs given later are satisfied simultaneously, then the system can be guaranteed to be asymptotically stable and satisfy the following conditions. Performance indicators Then, the controller feedback gain matrix can be derived. .
[0078] , (26) Proof: By introducing variable transformation operations Then multiply the LMIs of formula (22) on the left by both sides of the inequality. And multiply it by its transpose on the right. Simultaneously construct the equivalent matrix transformation relation: , , , , , , , and .
[0079] Through the above variable substitution and matrix transformation, the original LMIs criterion of formula (22) can be equivalently transformed into a more easily solvable form (formula (26)), which helps to improve the controller gain matrix. The calculation and implementation of system stability determination conditions.
[0080] This invention presents a closed-loop artificial pancreas simulation system built in MATLAB / Simulink, consisting of continuous glucose monitoring, a discrete-time control module, and an insulin pump. Control commands are updated at preset sampling times and applied to the insulin pump via a zero-order hold mechanism. This system is used to evaluate the comprehensive glucose control effect of the proposed interval type II fuzzy modeling, pump-constrained safety control, and ACK confirmation window mechanism. The system dynamics are described using a Bergman minimal model, and key physiological parameters are set according to typical type 1 diabetic patients; their specific values are shown in Table 1.
[0081] Table 1: Key Physiological Parameters
[0082] The coefficient matrix of the IT-2 fuzzy APS(21) using two rules is shown below: ; ; ; ; The definitions of upper and lower bound weights are summarized in Table 2, while the membership functions of upper and lower bounds are listed in Table 3.
[0083] Table 2: Weights
[0084] Table 3: Membership Functions
[0085] here Both weighting functions and membership functions are uniformly expressed in a bounded form and applied to the current state in the system model. and the sampling state in the controller implementation .
[0086] The derived LMI condition (26) is solved, and the maximum sampling interval is set to... The nominal input gain Setting it to 0.9, the controller gain obtained by solving for LMIs is: ; To comprehensively evaluate the performance of the proposed artificial pancreas control method under typical daily conditions, this embodiment of the invention set five standardized meals per day: breakfast 40g, with a decay rate parameter of 0.05, occurring at 8:00 AM; morning snack 15g, with a decay rate parameter of 0.10, occurring at 10:00 AM; lunch 60g, with a decay rate parameter of 0.05, occurring at 12:00 PM; afternoon tea snack 20g, with a decay rate parameter of 0.1, occurring at 3:00 PM; and dinner 50g, with a decay rate parameter of 0.06, occurring at 6:00 PM. The resulting exogenous glucose input trajectory is as follows: Figure 2 As shown, each meal results in a rapid rise in glucose levels followed by a gradual decline, which realistically depicts the absorption and metabolism process after eating. This provides a physiologically accurate input background for subsequent analysis of the control system's resilience to multiple post-meal disturbances.
[0087] To analyze the effects of different fixed insulin infusion strategies on blood glucose levels Figure 3a , Figure 3b and Figure 3c A comparison of intraday blood glucose trajectories under three basic infusion regimens is presented. For example, Figure 3a Scheme 1 shown adopts a constant base infusion rate , Figure 3b Scheme 2 shown increases the basic infusion to , Figure 3cScheme 3, as shown, maintains the basal infusion rate while briefly increasing the infusion rate only about 1.5 hours after meals. It can be observed that with only the basal infusion, the postprandial blood glucose peak significantly exceeds the safe upper limit; while continuous high infusion can reduce the peak to some extent, it introduces a significant risk of hypoglycemia during non-meal periods; and although a simple short-term postprandial infusion can alleviate some of the peak, it is still difficult to balance postprandial control and inter-meal safety under multiple meal disturbances. These results indicate that relying solely on a preset fixed infusion strategy is insufficient to achieve ideal blood glucose regulation, thus providing motivation and a benchmark for introducing intelligent closed-loop control and adaptive scheduling mechanisms.
[0088] To demonstrate the blood sugar control effect of the proposed control method under multiple meal conditions throughout the day, Figure 4 The plasma glucose trajectory under the combined effects of ACK window optimization and pump saturation constraint is presented. It can be seen that although blood glucose levels rise briefly after each meal, they gradually return to near the target range under the regulation of insulin infusion. The overall intraday trajectory remains within the clinically recommended safe range, without any sustained hyperglycemia or significant hypoglycemia. This demonstrates that, under the set dietary perturbations, the closed-loop control framework of this invention can achieve stable and acceptable blood glucose regulation performance.
[0089] Figure 5 Showing with Figure 4 The corresponding changes in insulin infusion rate reflect the actual output behavior of the controller under pump saturation and rate of change constraints. After each meal, the infusion rate briefly increases and approaches the pump's saturation limit to provide sufficient insulin to cope with the rapid rise in postprandial glucose; during non-meal periods, the infusion rate gradually decreases back to near the basal level. Throughout the process, the infusion curve never exceeds the preset amplitude and rate of change limits, indicating that the designed pump constraint modeling and control law can provide sufficient correction capability while avoiding over-infusion and excessively rapid infusion, ensuring the safety of the drug administration process.
[0090] Figure 6 The ACK window optimization under low saturation limit conditions is presented. The evolution trajectory over time. Simulation results show that when blood glucose levels are relatively stable in the morning, The strategy is set near the upper bound, corresponding to a longer communication interval, thus reducing bandwidth consumption during the steady-state phase; after breakfast, facing significant post-meal disturbances, the strategy will... Shrink to smaller values to increase update frequency; as the learning process progresses, The Q-scan gradually increases in a stepwise manner in subsequent periods, eventually stabilizing within a relatively large range. This figure illustrates that dual-Q learning can adaptively select an appropriate confirmation window length based on the current metabolic state and control requirements, rather than relying on a fixed communication cycle.
[0091] Figure 7 Displayed ACK confirmation window The adaptive characteristics of blood glucose fluctuations at different levels. It can be seen that when blood glucose fluctuations are large, with a clear upward or downward trend, These values are often compressed to smaller values, corresponding to more frequent instruction updates; while when blood glucose changes are small and close to the steady-state range, It will spontaneously expand to a larger value range, thereby reducing unnecessary confirmations and communications. This result intuitively demonstrates that the proposed mechanism can automatically adjust the communication rhythm according to blood glucose dynamics, achieving an effective trade-off between "control precision" and "resource overhead".
[0092] Figure 8 The cumulative reward over time under the double-Q learning framework is presented to reflect the impact of the learning process on control performance. It can be observed that the cumulative reward drops significantly shortly after each meal, due to temporary performance degradation caused by increased postprandial perturbation and enhanced insulin infusion. As the control strategy is gradually adjusted and blood glucose levels return to near the target range, the cumulative reward gradually recovers and shows a steady upward trend. In the long run, the curve flattens out, indicating that the strategy is close to convergence, achieving a relatively stable trade-off between blood glucose regulation effectiveness and communication / execution overhead. This figure validates the effectiveness and trainability of the proposed double-Q learning scheduling strategy from a reinforcement learning perspective.
[0093] This invention focuses on achieving safe, efficient, and reliable operation of an insulin pump control system (APS) under conditions of insulin pump saturation constraints and limited communication resources. First, based on the Bergman minimum model, a closed-loop system framework integrating a continuous glucose monitor, a control decision module, and an insulin pump is constructed, and the nonlinearity and uncertainty of glucose-insulin dynamics are accurately characterized using a type-II fuzzy modeling method. Second, a fuzzy controller explicitly considering the upper and lower limits of insulin pump output is designed, and the pump saturation characteristics are described using LPBR (Liquidity-Liquidity Regulator-Brain) form, ensuring that the closed-loop infusion command is always constrained within a clinically safe range. Furthermore, an ACK merging mechanism is introduced on the pump side, aggregating multiple update commands generated within the sampling period according to a time window, and using a double-Q learning algorithm to adaptively adjust the confirmation window length based on the real-time blood glucose trajectory. This significantly reduces the number of communications and redundant micro-dose corrections between the sensor and the insulin pump while ensuring the accuracy of blood glucose regulation and dynamic response speed. By constructing LKFs (Least Kinematic Factors) that include sampling effects and saturation influences, a set of LMI (Limited Mover's Injection) criteria is derived, based on which the asymptotic stability of the closed-loop system and the satisfaction of preset conditions can be determined. Robust control gain of performance indicators. Simulation results show that, under typical dietary disturbance scenarios, the method in this embodiment can quickly pull blood glucose back and maintain it within the clinically safe range, while effectively suppressing the integral saturation effect caused by pump saturation and reducing communication load. This demonstrates good physiological consistency, resource utilization efficiency, and engineering application value, providing solid theoretical support and technical implementation path for constructing a safe, reliable, and resource-efficient artificial pancreas system for practical clinical applications.
[0094] This invention also provides a control device for an artificial pancreas system based on interval type II and communication optimization, which can implement the above-mentioned control method for an artificial pancreas system based on interval type II and communication optimization. The device includes: The first module is used to perform interval type II fuzzy modeling on the Bergman minimal model based on the state variable samples of the artificial pancreas system to obtain the physiological dynamic model of the artificial pancreas system. The second module is used to perform saturation constraint processing on the initial control command that has not undergone saturation constraint, based on the physiological dynamics model and the saturation characteristics of the insulin pump, and based on the form of linear principal part plus bounded remainder term, to obtain saturation constraint control command. The third module is used to construct the ACK confirmation window mechanism. The ACK confirmation window mechanism accumulates the adjustment amounts of multiple control commands within the sampling period, and releases the accumulated control command adjustment amounts in a bounded manner when the ACK triggering mechanism is met, so as to generate the target control command. The fourth module is used to adaptively adjust the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism through the double Q learning algorithm, so as to obtain the adjusted confirmation window length and adjusted sampling interval. The fifth module is used to construct a closed-loop system model of the artificial pancreas system based on the physiological dynamics model, saturation constraint control command, ACK confirmation window mechanism, adjusted confirmation window length, and adjusted sampling interval. The sixth module is used to generate and send target control commands to the insulin pump based on dynamically acquired target state variables through a closed-loop system model, thereby realizing the control of the artificial pancreas system.
[0095] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0096] This invention also provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including a tablet computer, an in-vehicle computer, or similar device.
[0097] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0098] refer to Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0099] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0100] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0101] This invention also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions to cause the computer device to perform the aforementioned method.
[0102] In summary, the artificial pancreas system control method and related equipment based on interval type II and communication optimization according to embodiments of the present invention have the following advantages: 1. Construct an APS physiological model based on interval type II fuzzy logic, and use footprint uncertainty to characterize the nonlinearity and individual differences in glucose-insulin regulation, thereby improving the model's fit to actual physiological processes.
[0103] 2. The "LPBR" method is used to uniformly describe the amplitude and rate of change constraints of the insulin pump, and the hardware constraints are explicitly incorporated into the control design, which effectively avoids integral saturation and excessively rapid infusion, and improves the safety of drug administration.
[0104] 3. An instruction scheduling method based on ACK confirmation window and back pressure management is proposed, which merges multiple small updates into a small number of bounded executions. When blood glucose is stable, the update interval is automatically lengthened, which significantly reduces the number of communication and pump executions.
[0105] 4. Introducing double-Q learning, based on blood glucose deviation, rate of change and back pressure status, adaptively tuning the confirmation window length and sampling interval, automatically achieving a balance between "fast response / low overhead" between postprandial disturbances and the nighttime stable phase.
[0106] 5. Numerical simulation comparisons of typical dietary scenarios show that the method of the present invention is superior to traditional fixed sampling control schemes in maintaining blood glucose within a safe range and reducing the number of pump command updates, and has good application prospects.
[0107] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is altered and sub-operations described as part of a larger operation are executed independently.
[0108] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0109] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0110] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A control method for an artificial pancreas system based on interval type II and communication optimization, characterized in that, Includes the following steps: Based on the state variable samples of the artificial pancreas system, the Bergman minimal model is subjected to interval type II fuzzy modeling to obtain the physiological dynamic model of the artificial pancreas system. Based on the physiological dynamics model and the saturation characteristics of the insulin pump, the initial control command that has not undergone saturation constraint is subjected to saturation constraint processing based on the form of linear principal part plus bounded remainder term, so as to obtain saturation constraint control command; An ACK confirmation window mechanism is constructed; the ACK confirmation window mechanism accumulates multiple control instruction adjustment amounts within the sampling period, and releases the accumulated control instruction adjustment amounts in a bounded manner when the ACK triggering mechanism is met, so as to generate the target control instruction; The preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism are adaptively adjusted using the double-Q learning algorithm to obtain the adjusted confirmation window length and adjusted sampling interval. Based on the physiological dynamics model, the saturation constraint control command, the ACK confirmation window mechanism, the adjusted confirmation window length, and the adjusted sampling interval, a closed-loop system model of the artificial pancreas system is constructed. Based on the dynamically acquired target state variables, the target control command is generated and sent to the insulin pump through the closed-loop system model to achieve control of the artificial pancreas system.
2. The method according to claim 1, characterized in that, The method further includes the following steps: Based on Lyapunov stability theory, the performance of the closed-loop system model is analyzed.
3. The method according to claim 1, characterized in that, The process of obtaining the physiological and dynamic model of the artificial pancreas system by performing interval type II fuzzy modeling on the Bergman minimal model based on the state variable samples of the artificial pancreas system includes the following steps: Based on plasma glucose concentration, basal glucose level, plasma insulin concentration, basal insulin level, and remote insulin action bias, construct the bias state vector of the Bergman minimum model. Based on the deviation state vector, equivalent control input, and dietary disturbance, obtain the system vector model; Prerequisite variables were constructed based on plasma glucose concentration deviation and baseline glucose level; The safe change range of the premise variable is fuzzily divided, and multiple interval type II fuzzy sets and the upper and lower membership functions corresponding to the interval type II fuzzy sets are constructed. Based on the interval type-2 fuzzy set and the system vector model, multiple fuzzy rules and local models of the fuzzy rules are established. The upper and lower membership functions are subjected to type dimensionality reduction and normalization to obtain the normalized trigger strength of each fuzzy rule; Based on the normalized trigger intensity, the local model is weighted and fused to obtain the physiological dynamics model.
4. The method according to claim 1, characterized in that, Based on the physiological dynamics model and the saturation characteristics of the insulin pump, and using a linear principal component plus a bounded remainder term, the initial control command without saturation constraint is subjected to saturation constraint processing to obtain a saturated constraint control command. This includes the following steps: Based on the physiological dynamics model and the deviation state vector at the current moment, the initial control command without saturation constraint is obtained; Based on the saturation characteristics of the insulin pump, obtain the saturation operator; Based on the initial control command and the saturation operator, obtain the first characteristic model of the piecewise saturated nonlinear form of the insulin pump; The first characteristic model is transformed into the form of a linear principal part plus a bounded remainder term to obtain the second characteristic model; Prerequisite variables were constructed based on plasma glucose concentration deviation and baseline glucose level; Based on the aforementioned premise variables and the second characteristic model, a local control law is constructed; The local control law is weighted and fused to obtain the saturation constraint control command.
5. The method according to claim 1, characterized in that, The mechanism for constructing the ACK confirmation window includes the following steps: Set the preset confirmation window length and back pressure variable; Get the time interval between the current time and the last time the ACK was sent; The ACK triggering mechanism is constructed based on the preset confirmation window length and the time interval; The nominal adjustment step size is obtained based on the initial control command, the pre-selected nominal input gain, and the actual output of the insulin pump at the previous moment. When the time interval is greater than or equal to the preset confirmation window length, the ACK triggering mechanism is satisfied, the value of the confirmation triggering flag is 1, and the sum of the back pressure variable and the nominal adjustment step size is limited according to the amplitude constraint and the maximum rate of change constraint of the insulin pump to obtain the actual release of the control command adjustment amount. The target control command is generated and sent to the insulin pump based on the adjustment amount of the control command.
6. The method according to claim 1, characterized in that, The step of adaptively adjusting the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism using the double-Q learning algorithm to obtain the adjusted confirmation window length and adjusted sampling interval includes the following steps: The plasma glucose concentration deviation at the current moment, the plasma glucose concentration deviation at the previous moment, the preset sampling interval, and the back pressure variable are quantized to obtain a discrete state vector. Multiple candidate confirmation window lengths and multiple candidate sampling intervals are preset; By combining the candidate confirmation window length and the candidate sampling interval, a finite set of actions is obtained; Construct an instantaneous reward function based on the plasma glucose concentration deviation, the target control command, the overhead penalty, and the saturation penalty; Based on the average of the two Q tables and - A greedy strategy is used to select the target action from the finite set of actions; Perform the target action, observe the next discrete state vector, and obtain the reward value according to the instantaneous reward function; Based on the next discrete state vector and the reward value, a Q-table is randomly selected for updating, and the adaptive adjusted confirmation window length and the adjusted sampling interval are output.
7. A control device for an artificial pancreas system based on interval type II and communication optimization, characterized in that, include: The first module is used to perform interval type II fuzzy modeling processing on the Bergman minimal model based on the state variable samples of the artificial pancreas system to obtain the physiological dynamic model of the artificial pancreas system. The second module is used to perform saturation constraint processing on the initial control command that has not undergone saturation constraint based on the physiological dynamics model and the saturation characteristics of the insulin pump, using the form of linear principal part plus bounded remainder term, to obtain saturation constraint control command. The third module is used to construct an ACK confirmation window mechanism; the ACK confirmation window mechanism accumulates multiple control instruction adjustment amounts within the sampling period, and releases the accumulated control instruction adjustment amounts in a bounded manner when the ACK triggering mechanism is met, so as to generate the target control instruction; The fourth module is used to adaptively adjust the preset confirmation window length and preset sampling interval in the ACK confirmation window mechanism using the double Q learning algorithm, so as to obtain the adjusted confirmation window length and adjusted sampling interval. The fifth module is used to construct a closed-loop system model of the artificial pancreas system based on the physiological dynamics model, the saturation constraint control command, the ACK confirmation window mechanism, the adjusted confirmation window length, and the adjusted sampling interval. The sixth module is used to generate and send the target control command to the insulin pump based on the dynamically collected target state variables through the closed-loop system model, thereby realizing the control of the artificial pancreas system.
8. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The storage medium stores a program that is executed by a processor to implement the method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.