It was established that the main benefit of the feedback loop is that uncertainty of the closed-loop system can be made smaller than the uncertainty of the open loop system. A large variety of methods exist that properly capture the features of the underlying plant uncertainty, and a controller has been proposed which can minimize the uncertainty effect on the system performance.
-synthesis is a powerful procedure that explicitly accounts for the uncertain model parameters. The purpose of structured singular value
is to characterize the stability range of the
configuration
represents a deterministic LTI system connected in a feedback configuration with a static matrix
containing block diagonal uncertain elements. In other words, for each frequency
,
is calculated as an inverse of the maximal singular value of the uncertain block matrix
, which can drive the
feedback loop at the stability bounds. If the system possesses robust stability for a given frequency, then the value of
for this frequency because for all admissible values of the uncertain element
with infinity norm smaller than the unit, the closed-loop configuration will have no poles with a real positive part, i.e., will remain stable. In addition, the proximity of the
value to the unit bound will characterize the margin of robustness, or how much the uncertainty can be increased while the system preserves stability. The structured singular value can be used also to characterize system performance by reformulating performance requirements into stability ones.
4.1. Model Transformations
For the described uncertain LTI model of the AP system, we have a single scalar uncertain element
, corresponding to the time constant
. To show this, we exploit the structure of the uncertain model (3) and convert it into the framework of robust control theory [
36,
37], i.e., obtaining its
representation. The goal in
structure is to decompose the system into deterministic and uncertain subsystems, such that all fixed parameters are in a dynamic
M subsystem, and all uncertain parameters are in a static
block. First, let the uncertain term admit a representation
where
is equal to the central value in the range of the uncertain element
, and the deviation
is calculated such that the range of
matches the range of
. Therefore,
The result of this representation is that we can additively separate the uncertain term from the model Equations (3) such as
Therefore, we can replace the term containing the uncertain element
with a new external signal
, where
is a static gain matrix (with dimension 1 in our case), accumulating the uncertainty of the system. Therefore, the
representation becomes
where
is a scaling constant to map the range of parameter
into the range
(
Figure 2). As can be seen, the resultant dynamic model does not contain any uncertain elements. The uncertainty is represented as an external
element interacting with the model as a feedback generator of disturbances
. The participation of the uncertain parameters in a feedback loop is a critical factor impacting the internal stability of the modeled system, which in the case of AP can be interpreted in the line that there exists some uncertainty in the organism which can determine the stability of the BG concentration.
For further analysis, we need the frequency domain representation of the above relations, which can be obtained by taking the Laplace transform of both sides of the equation and applying matrix inversion and multiplication formulas for block matrices to obtain
where
is the transfer function of the linearized model from the previous section. It can be noted that the outputs of the model are filtered with a low-pass filter with the pole at the center of the uncertainty range. The uncertainty term
acts additively over the BG output. The uncertain element
of the open loop system is excited by the rate of change in the BG; hence, when the BG rate is higher, we can be less confident of the actual level of plasma glucose. In addition, the output of the uncertain block
is routed back to its input with a gain
, which could introduce further deviations in the measured signal due to uncertainty, i.e., if the current output level is uncertain, the future one will be even more so. This analysis is here to show that even with the introduction of a single uncertain element
in the model, we are able to account for a large spectrum of dynamic phenomena.
Figure 2 also contains the designed controller
K. The input to the controller is the error signal
e, calculated as a difference between BG target
r (typically held constant at 105 mg/dL) and measured BG concentration with the subcutaneous sensor
y. To represent the performance requirements for the system, two weighting filters were designed for tracking error
and for the control signal
. The purpose of these filters is to represent the performance requirements for the closed loop in a normalized coordinates
and
.
The glucose concentration tracking error weighting filter was designed according to [
37] as
where the parameters
A,
M, and
are tunable. The parameter
A determines the amount of loading disturbance reduction in the low-frequency range, i.e., when
,
. In our design, we selected
, which reflects a requirement for nearly 5 times reduction in the long-term effect of disturbances in subcutaneous glucose concentration. That will eventually establish zero error tracking of the target concentration after the disturbance signal is removed. The parameter
M determines the behavior of the weighting filter in the high-frequency range. When
, the
. In our design, we selected a value of
, which is close to the unit. We did not impose any constraints over the high-frequency oscillations of the subcutaneous glucose concentration. The reasons for this are twofold. First, we know that the signal-to-noise ratio (SNR) of continuous glucose-monitoring sensors worsens with the increase in the frequency; hence, we do not want the insulin bolus injections to correlate with the random sensor noise. Second, there are certain fundamental limitations in feedback theory in the Bode theorem, which could prevent obtaining high disturbance rejection for all frequencies. The tuning of
M in our case above the unit is guided by its numerical effect over the DK iterative procedure and the resultant model order. The parameter
determines the requirements for the bandwidth of the closed-loop system, which is reflected in the time domain as how aggressive the controller will be in responding to disturbances and what will be the peak value of glucose concentration. As is well known, if AP systems increase the aggressiveness of the controller, this may lead to a consistent under-regulation in the hypoglycemic region. Our experiments with the linearized model show that we can select
rad/s. Such a value corresponds to a settling time of glucose concentration after a meal to about 1 h, which will not be too demanding for the closed-loop AP system and will prevent the occurrence of hypoglycemic periods.
Similarly, the control signal weighting filter that allows separated tuning in low- and high-frequency domains was selected according to [
37]
where the low-frequency gain of the filter is
, the high frequency gain is
, and
determines the bandwidth of the filter. The
is an additional wide-band gain acting on all frequencies. The control weighting has a critical effect on the iterative controller design procedure as well as on the closed-loop behavior (especially when the manipulated variable is constrained). In the AP systems, the insulin infusion rate has a lower bound of 0 because we cannot remove the already injected bolus. The current generation of automatic insulin-delivering pumps does not pose any upper bound for the bolus or infusion rate. For example, the maximal amount of bolus which can be injected in a period of an hour is usually about several IUs, which is far beyond what is metabolically feasible for any individual.
The selected value of does not pose any restriction on the control signal behavior in the low-frequency range. Its value is tuned to guarantee numerical convergence of the DK iterative procedure. Increasing the value of M slightly above 1 guides the procedure to be more tolerable to slowly varying lower doses of insulin, which can be intuitively linked to mimicking basal-like injections in the classical AP variants. The high-frequency damping is set to to prevent any erratic or unweighted insulin infusions during normal glucose oscillations in a real-life scenario. The frequency band for the control signal is tuned with the parameter, which in the presented design is set to 1 rad/s. This corresponds to a settling time of the control signal of about 1 min, which matches the maximal reaction time of subcutaneous glucose measurement as well as the pump response time. There is no purpose in faster variation of the control signal. Finally, the value of determines the global weight of the control signal concerning the plant requirements and uncertainty. If the is set too high, the control signal will not be powerful enough to achieve the requirements specified with . Or, if is too low, then the control signal amplitudes will be increased significantly, hence violating the constraints of the nonlinear system. In this manner, the value of this parameter is selected, such that the observed control signal matches the range of the constraints and at the same time permits compliance with the close loop performance requirements.
Since the controller design is performed in a discrete-time domain with sampling time
min, the weighting filters are replaced with their Z-domain approximations
and
where
. The level of fit between continuous-time weighting filters and their discrete-time approximations can be easily assessed in the frequency domain or in the time domain. However, given the well-recognized numerical sensitivity of the
-controller design procedure, the selected method for discretization will lead to different realizations of the controller and eventually to different performance results.
One may note that the selected sampling time of 0.1 s is considerably lower than the conventional implementations of AP system where the sampling periods vary between 1 to 5 min to match the subcutaneous sensor response time. However, in our case, since we employ a variation of the state feedback controller, which relies on estimates of the internal model states, the sampling periods should be considered regarding the dynamics of the model. The Hovorka model incorporates terms for modeling blood glucose concentration; hence, the temporal scale of the processes there is below 1 min.
To incorporate performance requirements, specified with the weighting filters
and
into robust stability formulation (12), we introduce another uncertain element
between the exogenous signal
r and the performance metrics
:
The matrix
completes an imaginary loop between weighting filters and the BG target. The purpose then is to select the filters
and
to match the required spectral characteristics of the tracking error and control signal toward the amplitude of the exogenous reference signal
r. Therefore, we have
This representation combines all known information about the open loop system with performance requirements and uncertainty bounds. It is the starting point for
-synthesis and for the examination of robust stability and performance. The analysis of robust performance can be seen in the framework of robust stability by noting that
where
because
and
. In this case, the robust performance requirement becomes
for all
, where
is the transfer matrix from (26). This continuous time model is discretized using the selected sampling period
to allow the synthesis of a discrete-time controller
K, which can be embedded in the production AP system microcontroller.
4.2. (D,G)-K Iteration
The solution to the problem (12) for minimization of structured singular value still does not have a suitable mathematical solution, and only the approximate procedures are known because of the difficulties in obtaining an exact expression for
. The most common procedure for
-synthesis is the so-called DK iteration procedure, which stems from a particular approximation of the upper and lower bound of
as
where
U is a unitary matrix such that
,
, and
is a symmetric matrix to make
. Then, by varying elements of
U and
D, one can obtain an arbitrary close approximation for the structured singular value. Once the upper bound for the
value is estimated, the finding of controller
K is equivalent to
design problem, which can be carried out by various approaches such as Riccati equations, linear matrix inequalities (LMIs), etc. The classical approach is to solve 2 coupled Riccati equations and apply the bisection algorithm. In this manner, the suboptimal problem for finding
K for a fixed constant
is solved as
This relation should hold for all frequencies , which makes a frequency-dependent transfer function matrix. For each fixed and , a stabilizing controller satisfying (29) may or may not exist. If such a controller does not exist, the value of is increased, and, if a solution K exists, can be decreased until its minimal value is approximated. When a particular controller K is produced, the robustness of the closed-loop system is analyzed by calculating the upper bound of the structured singular value , which is equivalent to the minimization of the peak value of by varying elements of the transfer matrix . To satisfy commutative property , D is usually selected as a diagonal scaling matrix. The optimization of can be carried out either manually or with numerical optimization methods in the frequency domain, followed by the fitting transfer function polynomials to the obtained frequency responses. Hence, the calculation of for a given K is an iterative procedure which attempts to prove the robustness of K. After a particular upper bound for the is fixed with proper tuning of D, the order of the open loop system will be increased since terms of D will be added to meet inputs and outputs of the uncertainty block . So, essentially, this will lead to the filtering of the signals sent to and received from the uncertain element . That will position the system at the worst-case operating condition if the uncertain element action is replaced by exogenous disturbance signals with the unit norm. In this way, the design can be carried out again but for a modified weighting of the open loop to obtain another candidate controller K and its peak to be further evaluated. What this iterative process can guarantee is a sequence of controllers accounting for different estimates of the worst-case spectral properties of the exogenous disturbances and their impact on the performance metrics. From this sequence, the controller with minimal peak -value is selected because this controller has the most robust stability margin.
Since the minimization of the upper bound of
with a D-scaling matrix is carried out in the frequency domain, all uncertain elements from the block matrix
are assumed to be complex. However, in our case, the uncertain parameter
is a real variable in the interval
. Approximation of such real uncertainties with complex disks around them can lead to more conservative estimates for the upper bound of the structured singular value. If we consider that a real interval can be embedded as a chord in a complex disk in many different ways, an approach to further optimizing the upper bound of
is through the employment of additional scaling matrices
,
, and
, leading to the so-called (D,G)-K iterations [
36]. The idea is in addition to D scaling to apply affine scaling of the exogenous disturbance signals
with the help of frequency-dependent positive constant
and complex matrices
D and
G. Then,
can be used as a better estimate of the upper bound of structured singular value
, i.e., obtaining a less conservative estimate. The action of matrix
G can be seen as scaling the output of the uncertainty block
with
and as shifting the input
to the uncertainty block with
.
For the proposed uncertain AP model, the evaluation of the D scaling matrix is performed at 200 equally spaced frequencies from 0 to maximal frequency for the selected sample period of
rad/s. The result from the DK iteration is presented in
Table 3. The elements of the D matrix are selected with the aid of an optimization algorithm. As can be seen, the best controller is produced from the second iteration. The controller order from each consecutive iteration is equal to the order of the open loop system with the weighting filter plus the order of the left and right scaling matrices used to approximate the peak
in the previous iteration.
The controller from the second iteration is from the 24th order, and the original linearized model was from the 10th order after the extension with the uncertain state. From state feedback theory, we know that the order of the controller matches the order of the plant, since the controller incorporates an observer subsystem, composed of a model of the plant itself. However, in the case of design the model of the system is extended with the weighing filters to produce performance-determining signals. In our case, the weighting filters are both first-order transfer functions, so the first iteration of the design leads to 12th-order controller. With the following DK iterations, the weighting filters are further extended to highlight the worst-case spectrum of the exogenous disturbances.
Figure 3 compares the Bode plots of the controllers from each iteration. The controllers have similar dynamics in the low-frequency range up to 0.01 Hz, and the difference between them is only in the amplification. The first-iteration controller (a pure
) is with the highest gain of about 10 dB. The 2nd- and 3rd-iteration controllers share an identical proportional action, while the 4th iteration gives a controller with smaller unit amplification of around
dB. The reduction in the proportional term can improve the system’s robust stability but can have a negative effect on robust performance. On the other hand, the controller’s action is concentrated in frequencies between 0.01 up to 1 Hz, where a pronounced resonance is observed. The controller will react to the transient changes in the blood glucose concentrations in this frequency range, i.e., minimizing their future impact. The resonant frequency from the first and second-iteration controller is about the same at 0.03 Hz. The 2nd-iteration controller band is slightly narrower around its peak compared to the first one. The third-iteration controller is more aggressive and tries to shift the resonance frequency up to 0.1 Hz, obviously aiming for faster insulin infusion in a wider range of frequencies; however, in that case, its
value goes above 1, i.e., not all performance requirements will be satisfied. The 4th-iteration controller is an attempt to keep the resonance frequency of the 3rd controller and reduce its bandwidth, but unfortunately the structure of such a controller is not feasible because of the very high
. This can be understood by looking at the phase response where the 4th-iteration controller contains many unbalanced poles, which increase its phase delay below 200 degrees, which correlates negatively with stability.
The structure of
D and
scaling matrices obtained from the automatic optimization procedure is diagonal where
and
. Hence, the terms
and
will scale the uncertainty element arising from the parameter
representing the variable reaction of the subcutaneous BG concentration to plasma levels. The values of
for 2nd, 3rd, and 4th iterations are plotted in
Figure 4, since for the 1st iteration the D-scale is the identity matrix. And the
term is presented in
Figure 5, where it can be seen that the damping frequency for the controller from the 3rd iteration is less than the damping frequency for the controller from the 2nd iteration. For the other iterations, the
term is zero.
4.3. Closed-Loop Performance
The sensitivity functions of the closed-loop control system with the designed
-controller from the 2nd iteration, which has the best robust metrics, satisfy the performance requirements from the specification of weighting filters
and
. Since the controller guarantees that
where
is the output sensitivity function, this requirement is equivalent to an upper bound constraint for the magnitude of
S, determined by the inverse magnitude response of the weighting filter when
, i.e.,
Figure 6 presents the examination of this requirement, where plots are for both the upper bound determined by
and for the uncertain LTI closed loop with the
-controller, where the uncertain element is randomly sampled 30 times.
It is evident that the closed-loop system satisfies the weighing requirement both in the low- and high-frequency domains with a margin. The critical region where the system performance is tightly limited by the upper bound is around the cut-off frequency, which determines the response time with respect to output disturbances [
38]. In this region, the majority of plant variation due to uncertainty is concentrated. If we compare this with the open loop uncertainty ranges from
Figure 1, we can see that the
-controller effectively reduces the closed-loop uncertainty. The closed loop also exhibits resonance behavior around 0.02 Hz, which can be related to the level of over-dosing in case of meal events.
Similarly, for the sensitivity of the control signal to external disturbances, we have
where
K is the designed LTI controller. The comparison between the upper bound of the control sensitivity and the actual closed-loop frequency response is presented in
Figure 7. Again, the closed-loop response is evaluated for 30 random samples for the introduced uncertainty element. The controller satisfies with good margin the performance requirement for the control signal
u for all frequencies.
The complementary sensitivity function
of the closed-loop system with the
-controller is evaluated in
Figure 8, which represents the relationship between the BG target and the actual measured concentration. Here, we can measure the bandwidth of the system, which is between 0.001 and 0.01 Hz. The effect of the uncertainty over the complementary sensitivity function is to reduce its bandwidth. Depending on the variable delay between the plasma concentration and subcutaneous BG measurements, we can expect that system will respond faster or slower to maintain the BG concentration but within the limits of less than 1 decade of frequency variation. For the worst case, when the delay is largest, the controller will regulate the BG back to normal slower but still will achieve the target.
Since the controller order is 24, which might be high for implementation in digital devices, we decided to assess the possibility for its order reduction. In
Figure 9 the Hankel singular values of the designed controller are shown. It is seen that the possible order of reduced controller may be selected as 10. In
Figure 10, the singular values of the original and the reduced-order
-controllers are compared. They are almost the same. Therefore, it is expected that with the reduced-order controller, the achieved closed-loop performance will be similar. Finally, we evaluated the bounds of structured singular value for robust performance of the closed-loop system (
Figure 11). Both controllers provide robust performance for the prescribed range of uncertainty.