# Commuted PD Controller for Nonlinear Systems: Glucose-Insulin Regulatory Case
## Appendix A  
In this appendix, we check the stability conditions established in Section 2.4 without external disturbances, that is, considering \(D(t)=0\). We apply [PERSON]'s theory [31; 32; 33], where a vector solution \(x(t)\) in (12) is said to exist if it is absolutely continuous on \([0,\infty)\), and for almost all \(t\in[0,\infty)\), if \(x\) belongs to the convex closure over all sets of measure zero. Moreover, a system (12) is quadratically stable if there exist Lyapunov functions \(V_{j}=V_{j}(t,x)\), \(j=1,2\), verifying two conditions [32]:  
1. \(x\in\mathbb{R}^{3}-\{s_{j}\}\): \(\dot{V}_{j}<0\),
2. \(x\in\{s_{j}\}\): \(\sup\limits_{\alpha\in[0,1]}\left(\frac{\partial V_{j}}{\partial x}\big{(} \alpha f_{0}(t,x)+(1-\alpha)f_{j}(t,x)\big{)}\right)<0\).  
First, and only for stability proof, we use Jacobian linearization to linearize the nonlinear system (12) around the equilibrium point \((G_{b},0,I_{b})\):  
\[\bar{f}_{1}=\left(\begin{array}{ccc}\frac{-p_{1}-k_{1}}{-k_{2}}&-G_{b}&0\\ 0&-p_{2}&p_{3}\\ 0&0&-n\end{array}\right) \tag{13}\]  
\[\bar{f}_{0}=\left(\begin{array}{ccc}-p_{1}&-G_{b}&0\\ 0&-p_{2}&p_{3}\\ 0&0&-n\end{array}\right) \tag{14}\]  
\[\bar{f}_{2}=\left(\begin{array}{ccc}-p_{1}&-G_{b}&0\\ 0&-p_{2}&p_{3}\\ k_{1}-p_{1}k_{2}&-k_{2}G_{b}&-n\end{array}\right) \tag{15}\]  
The existence of the Lyapunov function of condition (i) from [PERSON]'s theory is ensured by the negativeness of the eigenvalues of the matrices (13)-(15) from the linearized model. Hence, from the triangular expression of (14) the negativeness is obvious. The eigenvaluesof (A1) have negative real part if \(\frac{-p_{1}-k_{1}}{1-k_{2}}<0\), where \(p_{1}>0\). Hence, these inequalities define a condition on the PD-control parameters:  
\[\frac{-p_{1}-k_{1}}{1-k_{2}}<0\Rightarrow\frac{p_{1}+k_{1}}{1-k_{2}}>0 \Rightarrow k_{2}<1.\]  
Under assumption \(k_{2}<1\), the stability of (A3) is verified, and the existence of Lyapunov function \(V_{j}\) is guaranteed if \(k_{1}<\frac{n\cdot p_{2}}{\zeta b\cdot p_{3}}\). From the experimental data in Table 1, we obtain \(k_{1}<0.301\). Condition (ii) ensures the stability where \(x_{1}\) takes its critical value.  
It is worthy to comment on the case of a discontinuity in \(x_{2}\), or \(x_{3}\) in (5)-(7). This would make the Filippov treatment a higher co-dimensional problem. Our control approach is based on the sign of \(x_{1}\) to activate the corresponding controller block. Therefore, if a discontinuity appears on variables \(x_{2}\) or \(x_{3}\), the control law can not be modified because only the glucose level is measured, but the stability issue is drastically increased [41]. One option to resolve this is to establish a safety region for variable \(x_{3}\), where the insulin concentration is considered healthy (from a physiologic point of view, we can consider \(I_{b}\pm\epsilon\), with \(\epsilon\) view as a measurement error). So, two intersecting smooth manifolds of co-dimension 1 define three regions on \(x_{1}\), and another two manifolds define the \(x_{3}\)'s regions. Then, \(\mathbb{R}^{2}\) is divided into nine regions, where condition (ii) must be verified in each one. This study is not treated here, but it is an interesting theoretical issue for future work.