Abstract
We propose a fault-tolerant artificial pancreas architecture for type 1 diabetes management that leverages advanced artificial intelligence (AI) methods. The system combines a step-forward predictive controller with a type-3 fuzzy logic system (FLS) in a dual-loop structure, augmented by a real-time sensor fault detection and compensation unit. The fault detection unit uses fuzzy prediction to estimate and correct sensor fault coefficients, thereby mitigating the impact of corrupted glucose measurements. Closed-loop stability is established through Lyapunov-based analysis, which informs the design of the adaptive compensator. Performance was evaluated using simulation studies on a modified Bergman model that incorporates patient variability and external disturbances. Results show that the proposed AI-based controller achieves greater robustness, adaptability, and fault tolerance compared with conventional control approaches. These findings demonstrate the promise of integrating predictive control with fuzzy logic for reliable intelligent healthcare systems, offering new opportunities for safe and effective AI-driven solutions in biomedical engineering.
Keywords: Artificial intelligent pancreas, Type 3 fuzzy system, Sensor fault, Type 1 diabetes, Lyapunov analysis
Subject terms: Engineering, Mathematics and computing
Introduction
General overview
According to the International Diabetes Federation (IDF), an estimated 537 million people worldwide were living with diabetes as of 2021. The number of people affected is expected to grow to 745 million by 2045. People with type 1 diabetes must take insulin regularly. This is because their bodies don’t make insulin, and without it, their blood glucose can become dangerously high or low, leading to health problems. An artificial pancreas (AP), a crucial tool for managing type 1 diabetes, is comprised of three key elements: a sensor for real-time blood glucose monitoring, a controller that dictates insulin dosage, and a pump that administers the insulin. So far, several methods have been proposed for designing an artificial pancreas. Most existing approaches design controllers based on a specific model of the insulin-glucose dynamics in patients with type 1 diabetes, without accounting for potential sensor failures or faults. Fewer designs have been made in the field based on input-output information that is important in practice. The following will examine the common control methods for regulating blood glucose in type 1 diabetic patients1,2.
Literature review
Although numerous control methodologies are proposed in the literature, the robustness of these systems against sensor faults remains largely unexplored. The design of AP typically involves the use of two primary categories of control algorithms: those considered classical and those considered intelligent. For example, the PID presented in3 details a specific implementation of the classic approach. To regulate blood glucose levels based on the Bergman model, both sliding mode control and its fractional-order variant have been implemented, coupled with a nonlinear observer4. A model predictive control methodology, as demonstrated in5, was applied to manage blood glucose levels, specifically addressing hyperglycemic and hypoglycemic events, utilizing real data. A predictive control strategy, incorporating an estimator for the complete state vector, is developed in6. In the domain of intelligent controller design, the ability to adapt to system uncertainties is crucial. One approach, detailed in7, involves dynamically identifying these uncertainties and subsequently adapting the controller’s parameters based on the identified model. In8, a significant advancement in insulin-glucose control was achieved through online FLS-based identification, operating without reliance on a predefined model. This identification process enabled the creation of a type-2 FLS-based predictive controller, which outperformed conventional control techniques. In9, T3-FLS was employed for online identification, which was then integrated with a predictive controller designed around the steady-state behavior of the control signal. The study assessed the system’s effectiveness when subjected to disturbances, noise, and uncertainties. Hardware redundancy, as demonstrated in10, provides a method for identifying sensor faults within AP system design. A key benefit in hypoglycemia prevention was demonstrated in11, where researchers utilized a specialized dynamic time warping technique for signal synchronization, alongside a Savitzky-Golay filter to enable real-time derivative estimation during principal component analysis. In order to function reliably in noisy environments, the algorithm of12 includes methods for both fault identification and performance upkeep. To preserve the optimal operational state of control systems, contemporary studies have extensively explored methods for detecting sensor failures in fault-tolerant designs13. In14, a method based on T3-FLSs and predictive control has been designed to sensor fault detection, which focuses on online sensor fault identification. However, this method is highly sensitive to disturbances entering the system. Furthermore, in15, an active sensor fault compensation strategy based on Type-3 fuzzy predictive control is proposed. This approach utilizes a control term to actively compensate for sensor errors. However, the method exhibits sensitivity to external disturbances, and both the predictive controller and the adaptive compensator are prone to divergence, which can potentially lead to system instability.
Model Predictive Control (MPC) has evolved into a widely recognized advanced control technique applicable to diverse control challenges16. As a result, the design of fault-tolerant control (FTC) systems based on predictive strategies has emerged as a significant and rapidly evolving research focus17. MPC-based fault-tolerant control strategies are generally categorized into passive and active approaches. Passive techniques integrate anticipated faults as static constraints during the MPC design phase, neglecting online fault information18. Consequently, the necessity to accommodate a wide range of hypothetical faults renders these methods less effective for real-scenarios. In contrast to passive methods, active fault-tolerant predictive controllers explicitly utilize real-time fault data to modify the optimization problem inherent in model predictive control. In19, a multiple-model strategy is employed to develop active fault-tolerant nonlinear model predictive control. This method’s strength lies in its ability to decrease the online computational, however, its practical application is hindered by implementation difficulties. Addressing the constraints of practical implementation, researchers have proposed leveraging FLSs, as detailed in20,21. These techniques employ real-time control signal computation, with fault information supplied by an integrated fault detection and isolation system. In22, a predictive controller is utilized for the real-time detection and correction of sensor faults. This technique relies on the plant’s model. In23, a dynamic approach is proposed to microgrid reconfiguration that operates in real-time. This method employs a dual-controller strategy: an initial predictive controller guides the system’s outputs towards set-point targets, followed by a second controller dedicated to performing the reconfiguration. Researchers have increasingly focused on intelligent fault detection methodologies to the safety and reliability of systems24.
The integration of intelligent techniques based on fuzzy system concepts has gained significant traction in the design of acceleration control systems, as researchers increasingly seek flexible and model-independent approaches. For example, in25, optimized type 2 fuzzy models have been used through metaheuristic methods such as cuckoo search and flower pollination. This approach has shown significant performance improvement compared to conventional type 1 fuzzy methods in surface process control. In26, the actuator fault problem in a class of nonlinear systems was investigated using type 2 fuzzy logic controllers. The parameters of the fuzzy system were optimized through genetic metaheuristic techniques combined with a pollination algorithm. In27, for the development of fault detection structures in control systems, fuzzy type 1 and type 2 systems have been investigated. In this approach, the performance evaluation of fuzzy type 1 and type 2 controllers with the harmony search algorithm has been used for optimization. In28, the control problem of a two-level reservoir system under actuator error is studied using the harmonic search algorithm in combination with type 2 fuzzy logic. The results show that the performance of the control system with type 2 fuzzy systems is better than that of type 1 fuzzy systems. In29, fuzzy logic-based control has been used to manage multivariable nonlinear systems in the presence of actuator and sensor errors. The proposed approach has been validated on a four-tank control system. In30, the superior effectiveness of intelligent control methods compared to classical controllers is investigated. Also, in31, the design of fuzzy logic-based control systems using different metaheuristic algorithms was compared in terms of their performance.
This paper investigates the application of intelligent techniques for both control system design and sensor fault detection. A concise summary of prevalent control strategies employed in type-1 diabetes management is presented in Table 1 for clarity.
Table 1.
A review of control schemes and research gaps for controlling glucose in subjects with type 1 diabetes.
| Number of Reference | Control schemes | Gaps in the research |
|---|---|---|
| 3 | Classic scheme (PID) |
offline scheme |
Predefined model-based design | ||
Not considering sensor failure | ||
| 4,32 | Classic scheme (Sliding Mode Control) |
offline scheme |
Not considering sensor failure | ||
Predefined model-based design | ||
| 5,6 | Classic scheme (MPC) |
offline scheme |
| 7,8 | Intelligent scheme (Type 2 fuzzy scheme) |
Weakly uncertain modeling |
Non-transparent asymptotic stability | ||
Non-obvious stability proof | ||
Not considering sensor failure | ||
| 9 | Intelligent scheme (Type 3 fuzzy scheme) |
Non-transparent asymptotic stability |
Non-obvious stability proof | ||
Not considering sensor failure | ||
| 10 | Classic scheme (Adaptive scheme) |
Hardware redundancy |
Model-based design | ||
| 11 | Classic scheme (Data-Driven) |
Passive scheme |
Offline scheme | ||
| 12 | Classic scheme (MPC) |
Offline scheme |
Passive scheme | ||
| 14 | Intelligent scheme (Type 3 fuzzy scheme) |
Non-transparent asymptotic stability |
Non-obvious stability proof | ||
Sensitivity to disturbance | ||
| 15 | Intelligent scheme (Type 3 fuzzy scheme) |
Non-transparent asymptotic stability |
Sensitivity to disturbance | ||
Controller divergence probability |
Research gap
Our Literature Review shows that many methods investigated for controlling type-1 diabetes utilize linear models, which may not accurately represent the complex, nonlinear dynamics of the insulin-glucose dynamics. Many existing techniques rely on comprehensive model data and access to all internal states. However, in real-world scenarios, we often only have access to the system’s output. Consequently, a methodology that functions solely on output measurements offers a significant practical benefit. Traditional control strategies often rely on pre-defined models for sensor fault detection, a process typically conducted offline. In the design of control systems in general and the insulin-glucose control system in type 1 diabetes, the use of low-order fuzzy systems has been shown to have less accuracy than T3-FLSs in the presence of uncertainty, noise, and disturbance. Therefore, the use of T3-FLSs can have greater improvements in design. This approach is vulnerable to inaccuracies stemming from real-world uncertainties. Implementing an online sensor fault identification method offers a significant advantage by adapting to these dynamic conditions. In this paper, a generalized approach to control structure design and sensor fault identification is developed, where implementation is not constrained by the particular system model or sensor dynamics. The increasing application of intelligent techniques in the modeling and control of nonlinear systems is a prominent trend in contemporary research. Building upon the preceding analysis, this study presents a control framework that utilizes a T3-FLS model for dynamic blood glucose level assessment, a steady-state control algorithm, a step-forward predictive strategy, an adaptive stabilizer to maintain closed-loop stability, and an auxiliary structure similar to the main structure. A concise summary of prevalent control strategies employed in type-1 diabetes management is presented in Table 1 for clarity.
Main contributions
The superior capabilities and accuracy of T3-FLSs compared to lower-level FLSs are well documented. In this article, we consider a control structure that takes advantage of these advantages. The proposed control system is based on an online approximation of the nonlinear dynamic output of the insulin-glucose metabolism, which includes a steady-state controller, a proportional controller, a step-forward predictive controller to arrive at optimal performance, and an adaptive stabilizer for the closed-loop structure. Finally, a summary of the key contributions is:
This study proposes a novel artificial pancreas system that integrates a fuzzy identifier, a step-forward predictive controller, an adaptive compensator, and a dedicated sensor fault detection module within a unified control framework.
A new T3-FLS is introduced for the real-time estimation of blood glucose levels, enabling the system to handle higher levels of uncertainty and imprecision compared to conventional FLSs.
An auxiliary loop, mirroring the primary control structure, is designed for real-time detection and compensation of sensor faults using a T3-FLS based predictor, enhancing system robustness under faulty measurements.
Lyapunov-based stability analysis is conducted for the entire closed-loop system, including both the primary and auxiliary compensators, ensuring reliable and provably stable glucose regulation.
The proposed methodology is extensively tested against practical disturbances, including sensor faults, unknown and time-varying patient parameters, meal-induced glucose excursions, and other external perturbations.
The proposed control framework demonstrates potential for broader application to other systems with similar uncertainty characteristics, extending its utility beyond artificial pancreas design.
This paper proceeds with the following structure. Nonlinear and fuzzy modeling of insulin-glucose dynamics is presented in Section Nonlinear and fuzzy modeling of insulin-glucose dynamics in type 1 diabetes. This part encompasses the proposed model, the closed-loop control with structures, and the implementation of a T3-FLSs to represent the identification of the system. Following this, Section Design of the main and auxiliary step-forward model predictive controller (SF-MPC) puts forth a step-forward predictive controller derived from the model detailed in Section Nonlinear and fuzzy modeling of insulin-glucose dynamics in type 1 diabetes. Sensor fault diagnosis process, built upon a T3-FLS based predictor, is developed in Section Sensor fault detection unit design. Section Stability analysis presents the stability analysis of the integrated control framework. The corresponding simulation results are discussed in Section Simulations. Finally, the main conclusions are outlined in Section Conclusion.
Nonlinear and fuzzy modeling of insulin-glucose dynamics in type 1 diabetes
This section presents nonlinear dynamics and fuzzy modelling of the insulin and glucose metabolism. Subsequently, it provides an overview of T3-FLS with applications. Finally, the problem formulation utilizing T3-FLSs and control structures is presented in general terms and with details of signals.
Glucose-insulin mathematical model in Type-1 diabetes
Bergman’s model is a well-accepted representation of insulin-glucose dynamics. To illustrate the effectiveness of the procedure presented in this article, we will use Bergman’s model, which is provided below33:
![]() |
1 |
This model includes patient-specific positive constants
,
,
,
,
,
,
,
,
,
, and
. The dynamic variables are: glucose level (g, mg/dl), insulin level (I, mU/L), remote insulin level (x, mU/L), injected insulin (u, mU/min), glucose absorption and metabolism (r1, r2), meal glucose content (d, mg), and subcutaneous insulin (U1, mU). Notably, g(t) is the output.
Problem formulation
Recognizing the limitations of lower-order FLSs, the development of T3-FLSs has emerged as a strategy for performance enhancement in recent literature34. The literature offers various examples, such as the modeling and control systems35, modelling of Hot Strip Mill system36, Modeling of nonlinear systems of the Takagi-Sugeno form37, modelling and control of nonlinear time delay systems38, modelling of mathematical functions39,40. Also in Robot control system, T3-FLSs play a significant role41. Due to the characteristics of T3-FLSs in dealing with uncertainty, this specific type of FLS is used in this paper for modeling, identifying, and diagnosing sensor faults. Figure 1 and Fig. 2 show the control structure in general and in detail. For fuzzy modeling of the uncertain and nonlinear of the insulin and glucose metabolism, the following model is considered:
![]() |
2 |
![]() |
3 |
![]() |
4 |
![]() |
5 |
![]() |
6 |
where
and
are the estimated value of the modified output and sensor output,
and
are the modified output and sensor output, F(t) is the coefficient proportional to sensor fault,
and
are the main and auxiliary IT3-FLS,
and
are the FLSs with real parameters
and
,
and
are approximation error,
and
are the adjustable vectors of the
and
,
and
are the inputs of
and
which are defined as below:
![]() |
7 |
![]() |
8 |
where,
,
,
and n are the sampling time and sample numbers,
and
are the control signals. The main and auxiliary controllers are assumed as follows:
![]() |
9 |
![]() |
10 |
The overall control inputs, denoted as
and
, are formed by the summation of several distinct components. These include the steady-state control signals (
and
), the outputs of the proportional controllers (
and
, the contributions from the step-forward predictive controllers (
and
), and the signals generated by the adaptive compensators (
and
). As depicted in Fig. 1 and Fig. 2, the presented structure integrates a suite of control and identification elements. This includes two steady-state controllers, a two-step forward predictive controller, two proportional controllers, two adaptive compensators, two T3-FLS based identifiers, and a sensor fault detection unit. A main identifier plays a crucial role in providing online estimates of the system’s true output. Following the fuzzification of input variables, a set of fuzzy rules is applied to classify them. Ultimately, this process yields a numerical output from the FLS, achieved through a three-step fuzzification procedure. Figure 3 illustrates the components of the main fuzzy identifier. Also, Fig. 4 shows the general structure of the T3-FLS. It’s important to recognize that the auxiliary control setup within the inner loop operates under similar conditions to the primary control structure. Controllers operating in steady-state and step-forward predictive controllers are developed utilizing the outputs of these FLSs. Furthermore, a T3-FLS is employed in the sensor fault detection unit, where its output serves as a step forward prediction for sensor fault estimation. Finally, two main and auxiliary adaptive compensators will be extracted by Lyapunov stability analysis to ensure the asymptotic stability of the inner and main loops. Following the definition of the inputs in (7) and (8), the domain of input variable is modeled using two Interval Type-3 Fuzzy Sets
. Memberships for each input are determined to be14,15:
![]() |
11 |
![]() |
12 |
In which
and
are upper and lower membership functions,
and
are upper width and lower width of
. by defining:
![]() |
13 |
and
![]() |
14 |
The upper and lower membership functions at each level
are calculated as follows:
![]() |
15 |
![]() |
16 |
![]() |
17 |
![]() |
18 |
In which
,
, and
. Also,
corresponds to membership functions at different levels, and
is a small positive value. It is worth mentioning again that for the FLS of (5), the relations are similar to those of FLS (2). The fuzzy rules are considered as follows:
then
![]() |
19 |
where,
is the membership function of
and
and
are the parameter of rules. Figure 5 shows the type 3 membership function. The rule triggers in the
and
levels are:
![]() |
20 |
![]() |
21 |
![]() |
22 |
![]() |
23 |
Finally, the fuzzy output is calculated as:
![]() |
24 |
where
and
Fig. 1.
General diagram of the proposed structure.
Fig. 2.
Proposed structure diagram with signal details.
Fig. 3.
Internal structure of the T3-FLS of the main identifier.
Fig. 4.
General structure of the T3-FLS.
Fig. 5.

Type 3 fuzzy membership.
. Also
and
are calculated as:
![]() |
25 |
![]() |
26 |
and:
![]() |
27 |
![]() |
28 |
![]() |
29 |
![]() |
30 |
So far, structural analysis and structural modeling have been discussed. The following sections will cover the design of the SF-MPC, a sensor fault detection component, and a stability assessment.
Design of the main and auxiliary step-forward model predictive controller (SF-MPC)
This section illustrates the proposed main and auxiliary SF-MPC scheme, focusing on the design of the predictive controller using the error between the fuzzy model output and the reference signal. Finally, Lyapunov methods will be considered to extract the compensatory control signals. According to 2 and 5, the discretization will be as follows:
![]() |
31 |
![]() |
32 |
To design the SF-MPC, the cost objective is assumed to be as follows:
![]() |
33 |
where
is the main reference input and
is the auxiliary reference. According to (31) and (32) by minimizing the objective function (33), the step-forward predictive control signals are obtained as follows:
![]() |
34 |
![]() |
35 |
Sensor fault detection unit design
The proposed sensor fault detection unit, detailed in this section, integrates an identification system for sensor output estimation, a T3-FLS for sensor fault coefficient estimation, and a predictor for obtaining the sensor fault value. The desired form of F(t) is:
![]() |
36 |
where
and
are mentioned in section Problem formulation. Since the value of F(t) is not accessible directly, we address the sensor fault estimation problem. For this purpose, a T3-FLS (
) with input vectors (37) is considered. where each element is characterized by a pair of interval type-3 fuzzy sets.
![]() |
37 |
The sampling interval is represented by
, while the total number of collected samples is denoted by m. The FLS design procedure presented in this section follows a similar structure to the one described in Section Problem formulation. So, to calculate the sensor fault coefficient and to train the FLS
, the desired output is defined as:
![]() |
38 |
To adjust the parameters of the FLS
, the Kalman filter algorithm developed in42 is used. Finally,
is estimated as follows:
![]() |
39 |
where
is the FLS parameters. It should be noted that the reference input of the sensor fault detection subsystem will vary as follows:
![]() |
40 |
Stability analysis
The subsequent sections introduce global and asymptotic stability, detailed in Theorems 1 and 2, respectively. Initially, Lyapunov stability theory is employed to establish global stability. Following this, asymptotic stability is demonstrated through the incorporation of adaptive compensators.
Global stability
Theorem 1
According to section
Nonlinear and fuzzy modeling of insulin-glucose dynamics in type 1 diabetes, the closed-loop system (dynamic model (1), estimator model (2), estimator model (5), controller (9), and controller (10)) is globally stable, if the adaptation laws
and
chosen as follows:
![]() |
41 |
![]() |
42 |
Where
introduced in section
Problem formulation,
calculated similarly to
,
,
,
, and
.
Proof
According to (2), (3), (5), and (6) we have:
![]() |
43 |
![]() |
44 |
Where
and
. The controllers are defined as follows:
![]() |
45 |
![]() |
46 |
In fact, global stability is analyzed independently of the compensators. The steady-state control signals are calculated according to Eq. (2) and (5) as follows:
![]() |
47 |
![]() |
48 |
Based on the (2), (5), (47), and (48) the steady-state control signals can be expressed as:
![]() |
49 |
![]() |
50 |
Also, proportional controllers are considered as follows:
![]() |
51 |
![]() |
52 |
where
and
are the tracking error. Also
and
are positive gains. Based on (3) and (6) for tracking error we can write:
![]() |
53 |
and
![]() |
54 |
Then the following Lyapunov function is selected as follows:
![]() |
55 |
So, we will have
![]() |
56 |
Substituting (43), (44), (53) and (54) yields to:
![]() |
57 |
According to (43) and (44) we have:
![]() |
58 |
Now, according to (41) and (42) we have:
![]() |
59 |
Assuming
and
, the Eq. (59) can be rewritten as follows:
![]() |
60 |
Finally, according to (60) we have:
![]() |
61 |
Assuming we have:
![]() |
62 |
and
![]() |
63 |
we have:
![]() |
64 |
In the assumptions (62) and (63), in the steady-state, the tracking error is zero, so the Lyapunov derivative of
. Moreover, with the external disturbance entering the system, the tracking error increases, which in turn increases the denominators in (62) and (63). As a result, the overall value of these terms decreases and becomes negative. Also, parameters
and
are chosen larger in practical applications than in the theoretical case, because they cause oscillatory behavior in the controller. Moreover, since the main component of the control laws are
and
the contribution of the multiplicative terms in (62) and (63) remains sufficiently small. Therefore, the condition of
is continuously satisfied, ensuring the global stability of the closed-loop system. Finally, it is demonstrated that the closed-loop system achieves global stability. Next, by adding the compensatory control signal, the asymptotic stability will also be proven.
Asymptotic stability
Theorem 2
As shown in Section
Nonlinear and fuzzy modeling of insulin-glucose dynamics in type 1 diabetes, the control system, incorporating the dynamic model (1), the estimator model (2) , the estimator model (3), the controller (9) and the controller (10), is asymptotic stable, if the compensators
and
, law of adaptations
and
,
and
are considered as below:
![]() |
65 |
![]() |
66 |
![]() |
67 |
![]() |
68 |
![]() |
69 |
![]() |
70 |
Where
,
,
,
,
, and
calculated similarly to section Global stability. Also
.
Proof
In this section,
,
,
,
,
, and
are calculated similarly to section Global stability. Also, based on (3) and (6) for tracking error we can write:
![]() |
71 |
and
![]() |
72 |
By defining
and
, the Lyapunov function is candidate as below:
![]() |
73 |
Then, we have:
![]() |
74 |
Substituting (43), (43), (71) and (72) yields to:
![]() |
75 |
According to (43) and (44) we have:
![]() |
76 |
Now, according to (67), (68), (76) we have:
![]() |
77 |
Assuming
and
, based on (69) and (70) the Eq. (79) can be rewritten as follows:
![]() |
78 |
Finally, based on (65) and (66) we have:
![]() |
79 |
Then we have:
![]() |
80 |
To show asymptotic stability, according to (71), (72), and (82) we have:
![]() |
81 |
From (81), we have:
![]() |
82 |
Based on (82), the bounded nature of the second derivative of V is revealed with respect to time. Leveraging Barbalat’s lemma, we can deduce the negative definiteness of the derivative of V, thus confirming asymptotic stability. The demonstration of Theorem 2 is now complete.
Simulations
The proposed strategy’s efficiency is underscored by its application to the completely uncertain Bergman model involving six virtual subjects. Table 2 provides the parameter values for this model. Notably, as established by the Bergman model, the uncontrolled behavior of all six simulated individuals is unstable33. The parameters for the suggested control structure are outlined in Table 3.
Table 2.
Bergman model parameters.
| Parameter | Virtual subject | |||||
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
76.60 | 80.30 | 89.20 | 75.60 | 92.40 | 91.20 |
![]() |
25.30 | 28.60 | 25.30 | 30.00 | 29.50 | 32.60 |
| d | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Table 3.
Parameters of the control structure.
Scenario 1
In this scenario, the performance of the control system is checked assuming no sensor faults. The inherent uncertainty in the system’s behavior is acknowledged, leading to variations in the Bergman model’s parameters. For instance, the parameter
fluctuates according to the equation
. Other parameters are similarly assumed to be undetermined. Furthermore, the system experiences disturbances over 24 hours, coinciding with meal times at
,
, and
, with each disturbance possessing a unique magnitude. Also, the reference input in this simulation is assumed to be 100(mg/dl). Given the considerable disparity between the data collection frequency (measured in minutes or hours) and the exceedingly swift information processing speed (a fraction of a microsecond), practical limitations are unlikely to arise. During the simulations, we considered a set of indices, detailed below:
![]() |
83 |
where S is the real data number,
is the real data and
is the estimation of the real data. Additionally, the percentage of time that blood glucose levels remain within the target range of [70–
over a 24-hour period, as well as the minimum recorded glucose level
during the same timeframe, are considered as supplementary performance metrics. Table 2 details the specific parameter values selected for virtual subject 1. Figure 6 and Fig. 7 illustrate the outcomes for virtual subject 1, demonstrating that tracking is well done. Furthermore, the estimator exhibits strong estimation accuracy. The initial value is considered as 200(mg/dl). The outcomes for additional virtual subjects are detailed in Table 4. This table shows the performance based on various indicators for the proposed scheme. It should be noted that in the simulations, the outputs are simulated according to Theorem 2, and for Theorem 1, the results can be seen in Table 4.
Fig. 6.
Output response of the closed-loop system based on Theorem 2 and Virtual Subject 1, considering parametric uncertainty and disturbance.
Fig. 7.
The main control signal entering the system based on Theorem 2, considering parametric uncertainty and disturbance for virtual subject 1.
Table 4.
Simulation parameters without considering sensor faults.
| Virtual subjects | Initial condition | ![]() |
Min of Glucose | RMSE , Theorem 1
|
RMSE , Theorem 1
|
RMSE , Theorem 2
|
RMSE ), Theorem 2
|
|---|---|---|---|---|---|---|---|
| 1 | 70 | 99.65 | 70 | 1.81 | 11.17 | 1.76 | 11.11 |
| 250 | 99.55 | 83 | 1.84 | 11.30 | 1.83 | 11.19 | |
| 350 | 99.47 | 83 | 1.88 | 12.15 | 1.89 | 12.05 | |
| 2 | 70 | 99.90 | 70 | 1.05 | 8.81 | 0.97 | 8.60 |
| 250 | 99.55 | 94 | 1.18 | 8.95 | 1.15 | 8.89 | |
| 350 | 99.34 | 94 | 1.52 | 9.19 | 1.44 | 9.08 | |
| 3 | 70 | 99.90 | 70 | 1.27 | 10.88 | 1.15 | 10.84 |
| 250 | 99.57 | 84 | 1.48 | 10.68 | 1.35 | 11.00 | |
| 350 | 99.24 | 85 | 1.84 | 12.45 | 1.81 | 12.22 | |
| 4 | 70 | 99.92 | 70 | 1.18 | 10.25 | 1.11 | 9.97 |
| 250 | 99.58 | 89 | 1.34 | 10.66 | 1.22 | 10.46 | |
| 350 | 99.33 | 89 | 1.70 | 10.88 | 1.61 | 10.62 | |
| 5 | 70 | 99.58 | 70 | 1.07 | 8.87 | 1.04 | 8.75 |
| 250 | 99.44 | 92 | 1.26 | 8.95 | 1.12 | 8.90 | |
| 350 | 99.12 | 92 | 1.63 | 9.15 | 1.58 | 9.01 | |
| 6 | 70 | 99.55 | 70 | 1.08 | 9.54 | 1.06 | 9.23 |
| 250 | 99.40 | 92 | 1.32 | 9.82 | 1.27 | 9.35 | |
| 350 | 99.01 | 92 | 1.64 | 10.05 | 1.56 | 9.99 |
Scenario 2
In scenario 2, the performance of the control system is investigated assuming a sensor failure. To evaluate the performance of the proposed approach, virtual subject 1 is utilized. It should be noted that other conditions, including initial conditions, disturbances entering the system, parameter uncertainties, etc., are assumed to be similar to scenario 1. Initially, the sensor’s efficiency degrades at a slow pace, losing up to 30 percent of its effectiveness at
. Subsequently, the rate of efficiency loss accelerates, reaching a 60 percent reduction at
. The results of this section in Fig. 8 and 9 show that despite the sensor fault, the actual output always tracks the reference input and remains within the normal range under disturbance conditions. Also, the fuzzy identification system gives us a good estimate of the real output, and the sensor fault identification system also estimates the sensor fault value well, which can be seen in Fig. 10. Figure 11 illustrates the convergence of the root mean squared error (RMSE) for the tracking error as the iterations progress. Additionally, it displays a histogram and box plot that summarize the distribution of RMSE values. The predicted output demonstrates a close alignment with the actual output, and the consistently small RMSE values suggest effective performance of both the closed-loop system and the fuzzy model. Notably, this simulation incorporates disturbances such as meals and random noise at every iteration to simulate physical activity and food intake. For other virtual subjects and considering similar conditions to virtual subject 1, it can be seen in Table 5. As observed, despite varying initial conditions and the presence of disturbances, the system consistently maintains stability concerning the defined indicators, and the output remains within the acceptable range. It should be noted that the graphical simulations are based on Theorem 2, and the results of Theorem 1 along with Theorem 2 are summarized in Table 5.
Fig. 8.
Output response of the closed-loop system based on Theorem 2 and Virtual Subject 1, considering sensor fault, parametric uncertainty, and disturbance.
Fig. 9.
The main control signal entering the system based on Theorem 2, considering sensor fault, parametric uncertainty, and disturbance for virtual subject 1.
Fig. 10.
Estimation of correction parameter
proportional to sensor fault.
Fig. 11.
The change in RMSE of tracking error across iterations; (b): Histogram plot of RMSE (e); (c): Box plot of RMSE(e)
Table 5.
Simulation parameters considering sensor faults.
| Virtual subjects | Initial condition | ![]() |
Min of Glucose | RMSE , Theorem 1
|
RMSE , Theorem 1
|
RMSE , Theorem 2
|
RMSE ), Theorem 2
|
|---|---|---|---|---|---|---|---|
| 1 | 70 | 99.65 | 70 | 1.82 | 11.18 | 1.77 | 11.12 |
| 250 | 99.55 | 83 | 1.86 | 11.30 | 1.85 | 11.19 | |
| 350 | 99.47 | 83 | 1.90 | 12.15 | 1.89 | 12.05 | |
| 2 | 70 | 99.90 | 70 | 1.07 | 8.81 | 0.98 | 8.60 |
| 250 | 99.55 | 94 | 1.19 | 8.95 | 1.17 | 8.89 | |
| 350 | 99.34 | 94 | 1.53 | 9.19 | 1.46 | 9.08 | |
| 3 | 70 | 99.90 | 70 | 1.29 | 10.88 | 1.16 | 10.84 |
| 250 | 99.57 | 84 | 1.49 | 10.68 | 1.37 | 11.00 | |
| 350 | 99.24 | 85 | 1.85 | 12.45 | 1.82 | 12.22 | |
| 4 | 70 | 99.92 | 70 | 1.19 | 10.25 | 1.11 | 9.97 |
| 250 | 99.58 | 89 | 1.36 | 10.66 | 1.22 | 10.46 | |
| 350 | 99.33 | 89 | 1.71 | 10.88 | 1.62 | 10.62 | |
| 5 | 70 | 99.58 | 70 | 1.08 | 8.87 | 1.04 | 8.75 |
| 250 | 99.44 | 92 | 1.28 | 8.95 | 1.12 | 8.90 | |
| 350 | 99.12 | 92 | 1.64 | 9.15 | 1.58 | 9.01 | |
| 6 | 70 | 99.55 | 70 | 1.09 | 9.54 | 1.07 | 9.23 |
| 250 | 99.40 | 92 | 1.33 | 9.82 | 1.27 | 9.35 | |
| 350 | 99.01 | 92 | 1.65 | 10.05 | 1.56 | 9.99 |
Scenario 3
In this scenario, we will first compare the proposed structure based on different FLSs. The outcomes of this comparative analysis are summarized in Table 6. The comparison criteria are also based on the RMSE of the tracking error based on Theorem 2. As can be seen, the design of the control structure using T3-FLSs has a more optimal performance. In addition, the system output responses are shown in Fig. 12 for a clearer comparison of the controllers designed using different types of fuzzy systems. As shown, the controller designed using the T3-FLSs framework has better tracking accuracy and disturbance rejection performance. Next, the proposed structure is compared using methods14 and15. The results of this comparison are summarized in Table 7. As can be seen, the proposed method has a better and more optimal performance with respect to the RMSE index of the tracking error. In this scenario, the initial condition is assumed to be 250(mg/dl), and the other parameters are similar to scenarios 2 and 3.
Table 6.
Performance comparison of fuzzy control systems under disturbance and uncertainty for virtual subject 1.
| Type of FLS | |||
|---|---|---|---|
| 1 | 2 | 3 | |
![]() |
86.23 | 92.11 | 99.55 |
RMSE of
|
3.15 | 2.59 | 1.85 |
RMSE of
|
16.62 | 12.65 | 11.19 |
Fig. 12.
Comparison of output response considering different fuzzy systems.
Table 7.
RMSE comparison of tracking error: Proposed method with other methods.
Scenario 4
This section will evaluate the controller risk analysis with and without the sensor fault detection structure. In this context, the concept of “risk” refers to the possibility that a process will not achieve its intended results43. This notion of risk encompasses two key elements: the factors that lead to failure and the consequences or expenses resulting from such failures. Here, the tracking error and the control signal are considered as factors of the risk function, which is rewritten as follows:
![]() |
84 |
Where
and
are introduced in Sections Nonlinear and fuzzy modeling of insulin-glucose dynamics in type 1 diabetes and Stability analysis. It should be noted that the tracking error values and control signal are assumed to be normalized between 0 and 1. The simulation results in the case without the sensor fault compensation structure and considering the sensor fault compensation for virtual subject 1 can be seen in Fig. 13. As can be seen, in the presence of disturbance, the risk function tends to zero for a limited time, and for the case without considering the sensor fault compensation block, the risk function diverges, and over time, the risk caused by the controller increases, which in this system will lead to dangerous phenomena of hypoglycemia and hyperglycemia, which will also cause damage to other organs and the body.
Fig. 13.

Response risk of a closed-loop control system with and without sensor fault compensation.
Conclusion
This paper proposed a novel and robust control architecture for artificial pancreas systems aimed at managing blood glucose regulation in individuals with type-1 diabetes, particularly in the presence of significant uncertainties and sensor faults. The dual-loop control system-comprising a primary regulation loop and an auxiliary fault-handling loop-integrates key components such as step-forward predictive controllers, adaptive compensators, and real-time system identification via T3-FLSs. A dedicated sensor fault detection module further enhances reliability by dynamically estimating and correcting sensor degradation in real time. Theoretical guarantees of closed-loop stability are rigorously established through Lyapunov analysis, ensuring the reliability of the controller under uncertain, time-varying physiological conditions. Comprehensive simulations were conducted using the uncertain Bergman model across six virtual subjects with varying metabolic profiles. These included scenarios with no sensor faults, time-varying parameters, meal disturbances, and progressive sensor degradation. In Scenario 1, the controller demonstrated high tracking accuracy and effective glucose regulation under parametric uncertainties and external disturbances. The results demonstrated that, for all virtual subjects, more than 99% of the time was spent within the target glucose range of 70–180 mg/dL. Furthermore, the low RMSE values indicated high control accuracy. Scenario 2 introduced progressive sensor faults, yet the proposed controller maintained robust tracking behavior. The internal fault detection loop successfully identified and compensated for sensor degradation, preserving system performance and safety. In Scenario 3, various fuzzy logic systems were evaluated, demonstrating that the T3-FLS substantially exceeded the performance of both Type-1 and Type-2 FLS in reducing the root mean square error RMSE and enhancing adherence to the desired glucose range. The proposed approach also demonstrated superior performance when benchmarked against existing methods in the literature. Scenario 4 analyzed risk using a custom risk function combining tracking error and control effort. Results confirmed that the system equipped with sensor fault compensation minimized the risk index, while omitting the fault module led to divergent risk, posing safety threats such as hypo- and hyperglycemia. The simulation results highlight the superior performance, reliability, and fault tolerance of the proposed methodology. The architecture’s robustness under real-world constraints makes it a promising candidate for next-generation artificial pancreas systems. Future work will explore actuator fault detection, simultaneous sensor–actuator fault compensation, and the implementation of event-triggered control strategies to optimize energy usage and responsiveness.
Author contributions
Conceptualization: V.T. M., K.A.A., A.K., and A.M.; Writing initial draft: A.K.; Formal analysis: V.T. M., K.A.A., A.K., and A.M.; Review and Editing: V.T. M., K.A.A., A.K., and A.M.
Funding
No funding was received for this study.
Data availability
The paper does not present any data, and does not use any data. All results can be re-extracted by the provided algorithm and equations.
Declarations
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Amilo, D. A quantum-inspired neural fuzzy sliding mode control framework for fractional-order modeling of intraocular pressure regulation and optic nerve damage in glaucoma. Sci. Rep.15(1), 23438 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Alolaiyan, H. et al. Optimal selection of diagnostic method for diabetes mellitus using complex bipolar fuzzy dynamic data. Sci. Rep.15(1), 3921 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Belmon, A. P. & Auxillia, J. An adaptive technique based blood glucose control in type-1 diabetes mellitus patients. Int. J. Numer. Methods Biomed. Eng.36(8), e3371 (2020). [DOI] [PubMed] [Google Scholar]
- 4.Delavari, H., Heydarinejad, H. & Baleanu, D. Adaptive fractional–order blood glucose regulator based on high–order sliding mode observer. IET Syst. Biol.13(2):43–54 (2019). [DOI] [PMC free article] [PubMed]
- 5.González, A. H., Rivadeneira, P. S., Ferramosca, A., Magdelaine, N. & Moog, C. H. Stable impulsive zone model predictive control for type 1 diabetic patients based on a long-term model. Optim. Control Appl. Methods41(6), 2115–2136 (2020). [Google Scholar]
- 6.Feng, K., Ji, J. C. & Ni, Q. A novel gear fatigue monitoring indicator and its application to remaining useful life prediction for spur gear in intelligent manufacturing systems. Int. J. Fatigue168, 107459 (2023). [Google Scholar]
- 7.Forooshani, R. Z., Siahi, M. & Ramezani, A. Adaptive type-2 fuzzy control for regulation of glucose level in type 1 diabetes. IETE J. Res.68(1), 194–204 (2022). [Google Scholar]
- 8.Mohammadzadeh, A. & Kumbasar, T. A new fractional-order general type-2 fuzzy predictive control system and its application for glucose level regulation. Appl. Soft Comput.91, 106241 (2020). [Google Scholar]
- 9.Khani, A., Bagheri, P., Baradarannia, M. & Mohammadzadeh A. Type 3 fuzzy predictive control of the insulin-glucose system in type 1 diabetes. Int. J. Fuzzy Syst.27, 805–817 (2024). 10.1007/s40815-024-01806-z
- 10.Mahmoudi, Z., Nørgaard, K., Poulsen, N. K., Madsen, H. & Jørgensen, J. B. Fault and meal detection by redundant continuous glucose monitors and the unscented Kalman filter. Biomed. Signal Process. Control38, 86–99 (2017). [Google Scholar]
- 11.Turksoy, K., Hajizadeh, I., Littlejohn, E. & Cinar, A. Multivariate statistical monitoring of sensor faults of a multivariable artificial pancreas. IFAC-Pap.50(1), 10998–1004 (2017). [Google Scholar]
- 12.Yu, X. et al. Fault detection in continuous glucose monitoring sensors for artificial pancreas systems. IFAC-Pap.51(18), 714–719 (2018). [Google Scholar]
- 13.Zhang, Y. & Jiang, J. Bibliographical review on reconfigurable fault-tolerant control systems. Annu. Rev. Control32(2), 229–252 (2008). [Google Scholar]
- 14.Khani, A., Bagheri, P., Baradarannia, M. & Mohammadzadeh, A. Artificial intelligent pancreas for type 1 diabetic patients using adaptive type 3 fuzzy fault tolerant predictive control. Eng. Appl. Artif. Intell.139, 109627 (2025). [Google Scholar]
- 15.Khani, A., Bagheri, P., Baradarannia, M. & Mohammadzadeh, A. Type 1 diabetes control using type 3 fuzzy fault tolerant predictive control. Optim. Control Appl. Methods. 46 (5), 2095–2107 (2025).
- 16.Norouzi, A., Heidarifar, H., Hoseinali, B., Shahbakhti, M. & Charles, K. R. Integrating machine learning and model predictive control for automotive applications: A review and future directions. Eng. Appl. Artif. Intell.120, 105878 (2023). [Google Scholar]
- 17.Hui, L. et al. Robust asynchronous fuzzy predictive fault-tolerant tracking control for nonlinear multi-phase batch processes with time-varying reference trajectories. Eng. Appl. Artif. Intell.133, 108415 (2024). [Google Scholar]
- 18.Adukwu, O., Odloak, D. & Junior, F. K. Fault-Tolerant Control of Gas-Lifted Oil Well. IEEE Access11, 24780–24793 (2023). [Google Scholar]
- 19.Kargar, S. K., Salahshoor, K. & Yazdanpanah, M. J. Integrated nonlinear model predictive fault tolerant control and multiple model based fault detection and diagnosis. Chem. Eng. Res. Des.92(2), 340–349 (2014). [Google Scholar]
- 20.Kang, Y., Yao, L. & Ren, Y. Fault diagnosis and model predictive fault-tolerant control for stochastic distribution collaborative systems based on the T-S fuzzy model. Int. J. Syst. Sci.51(4), 719–730 (2020). [Google Scholar]
- 21.Chilin, D., Liu, J., de la Peña, D. M., Christofides, P. D. & Davis, J. F. Detection, isolation and handling of actuator faults in distributed model predictive control systems. J. Process Control20(9), 1059–1075 (2010).
- 22.Bavili, R. E. et al. A new active fault tolerant control system: Predictive on-line fault estimation. IEEE Access9, 118461–118471 (2021). [Google Scholar]
- 23.Zafra-Cabeza, A., Marquez, J. J., Bordons, C. & Ridao, M. A. An on-line stochastic MPC-based fault-tolerant optimization for microgrids. Control Eng. Pract.130, 105381 (2023). [Google Scholar]
- 24.Feng, K. et al. Digital twin enabled domain adversarial graph networks for bearing fault diagnosis. IEEE Trans. Ind. Cyber-Phys Syst.1, 113–122 (2023).
- 25.Patel, H. R. & Shah, V. A. Shadowed type-2 fuzzy sets in dynamic parameter adaption in cuckoo search and flower pollination algorithms for optimal design of fuzzy fault-tolerant controllers. Math. Comput. Appl.27(6), 89 (2022). [Google Scholar]
- 26.Patel, H. R. & Shah, V. A. A metaheuristic approach for interval type-2 fuzzy fractional order fault-tolerant controller for a class of uncertain nonlinear system. Automatika: časopis za automatiku, mjerenje, elektroniku, računarsvo i komunikacije63(4), 656–675 (2022).
- 27.Patel, H. R. & Shah, V. A. Comparative analysis between two fuzzy variants of harmonic search algorithm: Fuzzy fault tolerant control application. IFAC-Pap.55(7), 507–512 (2022). [Google Scholar]
- 28.Patel, H. R. & Shah, V. A. Fuzzy logic based metaheuristic algorithm for optimization of type-1 fuzzy controller: Fault-tolerant control for nonlinear system with actuator fault. IFAC-Pap.55(1), 715–721 (2022). [Google Scholar]
- 29.Patel, H. R. & Shah, V. A. Decentralized stable and robust fault-tolerant PI plus fuzzy control of MIMO systems: a quadruple tank case study. Int. J. Smart Sens. Intell. Syst.12(1), 1 (2019). [Google Scholar]
- 30.Patel, H. R. Optimal intelligent fuzzy TID controller for an uncertain level process with actuator and system faults: population-based metaheuristic approach. Franklin Open.4, 100038 (2023). [Google Scholar]
- 31.Patel, H. R. & Shah, V. A. Simulation and comparison between fuzzy harmonic search and differential evolution algorithm: type-2 fuzzy approach. IFAC-Pap.55(16), 412–417 (2022). [Google Scholar]
- 32.AL-Samarraie, S.A. & Salman, S. D. Backstepping nonlinear control for blood glucose based on sliding mode meal observer. Al-Nahrain J. Eng. Sci.21(3), 436–444 (2018).
- 33.Maxime Penet. Robust Nonlinear Model Predictive Control based on Constrained Saddle Point Optimization : Stability Analysis and Application to Type 1 Diabetes. Other. Supélec, 2013. English. ⟨NNT : 2013SUPL0019⟩. ⟨tel-00968899⟩
- 34.Valdez, F., Castillo, O. & Melin, P. A bibliometric review of type-3 fuzzy logic applications. Mathematics13(3), 375 (2025). [Google Scholar]
- 35.Aliev, R., Abiyev, R. & Abizada, S. Type-3 fuzzy neural networks for dynamic system control. Inf. Sci.690, 121454 (2025). [Google Scholar]
- 36.Mendez, G. M., Lopez-Juarez, I., Montes-Dorantes, P. N. & Garcia, M. A. A new method for the design of interval Type-3 fuzzy logic systems with uncertain Type-2 non-singleton inputs (IT3 NSFLS-2): A case study in a hot strip mill. IEEE Access11, 44065–44081 (2023). [Google Scholar]
- 37.Singh, D. J., Verma, N. K., Ghosh, A. K. & Malagaudanavar, A. An approach towards the design of interval type-3 T–S fuzzy aystem. IEEE Trans. Fuzzy Syst.30(9), 3880–3893 (2021).
- 38.Harikaran, B., Harshavarthini, S., Lee, S., Sakthivel, R. & Sathiyaraj, T. New results on interval type-3 fuzzy control for nonlinear time-delay systems using convex relaxation technique. IEEE Trans. Syst. Man. Cybern : Syst.55 (5), 3630–3641 (2025).
- 39.Melin, P. & Castillo, O. A type-3 fuzzy-fractal approach for diagnosis of mental disorders. In: Type-3 Fuzzy Logic and Fractal Theory for Medical Diagnosis. p. 47–55 (Springer, 2025).
- 40.Amador-Angulo, L., Castillo, O., Melin, P. & Geem, Z. W. Type-3 fuzzy dynamic adaptation of Bee colony optimization applied to mathematical functions. Fuzzy Sets Syst.489, 109014 (2024). [Google Scholar]
- 41.Elhaki, O., Shojaei, K., Mohammadzadeh, A. & Rathinasamy, S. Robust amplitude-limited interval type-3 neuro-fuzzy controller for robot manipulators with prescribed performance by output feedback. Neural Comput. Appl.35(12), 9115–9130 (2023). [Google Scholar]
- 42.Qasem, S. N., Ahmadian, A., Mohammadzadeh, A., Rathinasamy, S. & Pahlevanzadeh, B. A type-3 logic fuzzy system: Optimized by a correntropy based Kalman filter with adaptive fuzzy kernel size. Inf. Sci.572, 424–443 (2021). [Google Scholar]
- 43.Moradi, R. & Groth, K. M. Hydrogen storage and delivery: Review of the state of the art technologies and risk and reliability analysis. Int. J. Hydrog. Energy44, 12254–12269 (2019). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The paper does not present any data, and does not use any data. All results can be re-extracted by the provided algorithm and equations.




























































































































































































































