# Commuted PD Controller for Nonlinear Systems: Glucose-Insulin Regulatory Case
## 3 Results  
Simulation experiments of our controlled pancreatic model are carried out here, and for different patients shown in Table 1[6] (the value \({}^{*}\) in Patient 3 denotes a modified value to obtain a notable hyperglycemia case). The total simulation time is over 800 min, and the sample time is set to 2 min, as in [11]. Although blood glucose uptake presents slow dynamics [34], we set a sampling time of 2 min to capture the dynamics of the glucose-insulin system without incurring excessive computational overhead. The control parameter values are stated as \(k_{1}=0.09\) and \(k_{2}=0.04\)[11]. Note that these values verify the stability conditions, as shown in Appendix A. In [35], algorithms to tune PD control parameters are presented. Our purpose is to test the switched strategy, not to find the best PD control parameters.  
\begin{table}
\begin{tabular}{c c c c c} \hline  & **Healthy** & **Patient 1** & **Patient 2** & **Patient 3** \\ \hline \(p_{1}\) & 0.0317 & 0 & 0 & 0 \\ \(p_{2}\) & 0.0123 & 0.02 & 0.0072 & 0.0142 \\ \(p_{3}\) & 4.92 \(\times 10^{-6}\) & \(5.3\times 10^{-6}\) & \(2.16\times 10^{-6}\) & \(9.94\times 10^{-5}\) \\ \(\gamma\) & 0.0039 & 0.005 & 0.0038 & 0.0 \({}^{*}\) \\ \(n\) & 0.2659 & 0.3 & 0.2465 & 0.2814 \\ \(\sigma\) & 79.0353 & 78 & 77.5783 & 82.9370 \\ \(G_{b}\) & 70 & 70 & 70 & 70 \\ \(l_{b}\) & 7 & 7 & 7 & 7 \\ \(x_{1}(0)\) & 291.2 & 220 & 200 & 180 \\ \(x_{2}(0)\) & 0 & 0 & 0 & 0 \\ \(x_{3}(0)\) & 364.8 & 50 & 55 & 60 \\ \hline \end{tabular}
\end{table}
Table 1: Parameter values [6]. The value \({}^{*}\) in Patient 3 denotes a modified value to obtain a notable hyperglycemia case.  
To test the effectiveness of our switched control strategy, different scenarios are considered: commuted controller (9) and (10) are compared to the uncontrolled situation, and to system (1)-(3) with the classic PD controller \(u(t)=u_{c}(t)\) defined in [11; 13]:  
\[\dot{x}_{1}(t) = -p_{1}(x_{1}(t)-G_{b})-x_{1}(t)\cdot x_{2}(t)+D(t), \tag{16}\] \[\dot{x}_{2}(t) = -p_{2}x_{2}(t)+p_{3}(x_{3}(t)-I_{b}),\] (17) \[\dot{x}_{3}(t) = -n(x_{3}(t)-I_{b})+\gamma[x_{1}(t)-\sigma]^{+}t+u_{c}(t), \tag{18}\]  
where the control is defined by:  
\[u_{c}(t)=k_{1}(x_{1}(t)-G_{b})+k_{2}x_{1}(t). \tag{19}\]  
Also, decaying and additive disturbance are considered, all for each patient in Table 1[6]. Figures 2-9 present different scenarios that reinforce our proposal (each one in a different subsection):  
* Decaying exponential disturbance \(D(t)\) (4): open-loop and closed-loop with commuted PD controller (Figures 2-4);
* Additive disturbance (Figures 5 and 6);
* Change in the dynamic Equation (5), proving the efficiency of our control algorithm against slight modification on glucose assimilation (Figure 7);
* Finally, a reset-PID controller is implemented, showing that despite the rise time being reduced, the control law presents chattering, a nondesired effect for a pancreatic system (Figures 8 and 9).  
The physiologic meaning of these situations are as follows: the term D(t) represents the glucose absorption's rate; the additive disturbance simulates a nonprogrammed ingestion; the change on the dynamic assimilation smooths the control term; the integral part takes into account the past glucose concentrations.. Each figure of glucose blood concentration displays the healthy range 60-110 [9] to measure the duration of hypo- and hyperglycemia episodes. For each patient, we compute the glucose and insulin blood concentration \(x_{1}(t)\) and \(x_{3}(t)\), respectively, and the control actions \(u(t)\) and \(u_{g}(t)\) (verifying in this case that they are both positive). The simulation results of patients are obtained using the data in Table 1, with \(D(t)=0.5\,e^{-0.005t}\)[18]. Note that in [6], \(D(t)=0\) is used. We decided to use a different value of it to be more realistic taking the exogenous factor into account. Also, the pump dynamics have been ignored (for a justification, see [6]).