## 2 Mathematical Modeling
### Insulin/Glucose Plant Modeling  
Plant models were developed to see T1 DM patients' blood glucose levels in the simulation environment and to calculate the controller parameters. These models differ in terms of complexity and accuracy. One linear, one nonlinear, and one comprehensive model were chosen among a great many models in the literature. The [PERSON] model was used in the design of an optimum controller as a linear model; the [PERSON] model was selected as the nonlinear model with medium-level detail applied on all of the controllers. Finally, the Sorensen model was used as the model which shows the insulin glucose level in each part of the body in a detailed way [6]. [PERSON] [18; 31; 32], developed a model utilizing four first-order rate constants for the glucose-insulin interactions. The model is described on two poles; the first one is \(G\) = blood glucose level; another one is \(H\) = hormone level. \(g\) and \(h\) parameters in the linear model are defined by considering the differences in fasting values for \(g\equiv G-G_{0}\) and \(h\equiv H-H_{0}\). \[\frac{dg}{dt}=m_{1}g-m_{2}h+J(t), \tag{5}\]  
\[\frac{dh}{dt}=-m_{3}h+m_{4}g+K(t); \tag{6}\]  
Figure 1: Working principle of valveless piezoelectric pump illustration: (**a**) pumping mode; (**b**) suctioning mode. \(m_{1}\) represents glucose activity, \(m_{2}\) is a parameter for the removal of glucose due to blood hormone concentration, \(m_{3}\) is defined for the duration of insulin action, and \(m_{4}\) is for the removal of hormone for high glucose concentration (typically 0 for T1 DM). \(J(t)\) and \(K(t)\) are rates of exogenous glucose and hormone, respectively. Although the model of insulin and glucose dynamics adapted from [PERSON] et al. [21] define a similar model with [PERSON] [18] for glucose-insulin interactions, it has three compartments for plasma insulin \(I(t)\), remote insulin \(X(t)\), and plasma glucose \(G(t)\). \(p_{1}\) is a parameter at which glucose is removed from the plasma space independent of the influence of insulin, and the rate of insulin appearance and remote insulin disappearance are governed by \(p_{3}\) and \(p_{2}\), respectively. The time constant for insulin disappearance is defined with \(n\). Subscript \(B\) is defined for basal plasma concentrations, and (0) is the level of the parameter at \(t=0\), and external insulin infusion is defined as \(u(t)\), and meal intake is defined with \(p(t)\)[23, 24]. \[\frac{dG(t)}{dt}=-(p_{1}+X(t))\;G(t)+p_{1}G_{B}+p(t),\;\text{where}\;G(0)=G_{b}, \tag{7}\]  
\[\frac{dX(t)}{dt}=-p_{2}X(t)+p_{3}[I(t)-I_{B}],\;\text{where}\;X(0)=0, \tag{8}\]  
\[\frac{dl(t)}{dt}=-n[I(t)-I_{B}]+u(t),\;\text{where}\;I(0)=I_{b}, \tag{9}\]  
Finally, the Sorensen model is used for advanced glucose-insulin metabolism modeling. [PERSON] [24] used the compartment modeling technique. Six compartments are used: brain, heart/lungs, gut (stomach-intestine), liver, kidney, and periphery (muscle-adipose). Mass balance for glucose of brain is \(\frac{dG_{BV}}{dt}\) and \(\frac{dG_{BI}}{dt}\), heart and lungs: \(\frac{dG_{BI}}{dt}\), gut: \(\frac{dG_{G}}{dt}\), liver: \(\frac{dG_{I}}{dt}\), kidney: \(\frac{dG_{K}}{dt}\). The periphery is defined, and periphery equations are given below. First subscripts are defined as follows: \(B\) is the brain, \(G\) is the gut, \(H\) is the heart, \(L\) is the liver, \(K\) is the kidney, and \(P\) is the periphery. Second subscripts are as follows: \(I\) is interstitial fluid space, and \(V\) is vascular blood space; also \(B\) is defined as basal value, and \(N\) is defined as normalized value by using basal values [33]. \[\frac{dG_{PI}}{dt}=\frac{V_{PI}}{T_{P}^{G}V_{PI}}\cdot(G_{PV}-G_{PI})-\frac{ \Gamma_{PGU}}{V_{PI}}, \tag{10}\]  
On the other hand, mass balance for insulin of the brain is \(\frac{dI_{B}}{dt}\), and for heart and lungs \(\frac{dI_{BI}}{dt}\). In terms of insulin intake, \(i(t)\), gut \(\frac{dI_{G}}{dt}\), liver \(\frac{dI_{I}}{dt}\), and kidney \(\frac{dI_{K}}{dt}\).