---
# System prepended metadata

title: Blood glucose + insulin + glucagon model

---

Blood glucose + insulin + glucagon model
===
$\frac{\text dG(t)}{\text dt} = L(t)-I(t)+\frac{D(t)}{\theta_2} \qquad G(0)=G_b$
$\frac{\text dI(t)}{\text dt} = \theta_0(G(t)-G_b)-\frac{I(t)}{a} \qquad I(0)=0$
$\frac{\text dL(t)}{\text dt} = \theta_1(G_b-G(t))-\frac{L(t)}{b}  \qquad L(0)=0$
$\frac{\text dD(t)}{\text dt} = -\frac{D(t)}{\theta_2}+\frac{2V(t))}{c} \qquad D(0)=0$
$\frac{\text dV(t)}{\text dt} = -\frac{2V(t))}{c} \qquad V(0)=V_0$

state vector
$x(t) = \begin{pmatrix} G(t)\\ I(t)\\ L(t)\\ D(t)\\ V(t)\end{pmatrix}$

steady-state
$x^s = \begin{pmatrix} G_b & 0 & 0 & 0 & 0\end{pmatrix}^\intercal$

deviation variables
$\Delta x(t) = \begin{pmatrix} G(t)-G_b\\ I(t)\\ L(t)\\ D(t)\\ V(t)\end{pmatrix}$

model with deviation variables
$\frac{\text d\Delta x(t)}{\text dt} = \begin{pmatrix} 0& -1& 1& \frac{1}{\theta_2}& 0\\ \theta_0 & \frac{-1}{a} &  0 & 0 & 0\\-\theta_1 & 0 & \frac{-1}{b} & 0 & 0 \\ 0 & 0 & 0 & -\frac{1}{\theta_2} & \frac{2}{c} \\ 0 & 0 & 0 & 0 & -\frac{2}{c}\end{pmatrix}\begin{pmatrix} G(t)\\ I(t)\\ L(t)\\ D(t)\\ V(t)\end{pmatrix}$



$0 = L(t)-I(t)$ % L = I = 0 
$0 = a\theta_0(G(t)-G_b)-I(t)$
$0 = b\theta_1(G_b-G(t))-I(t)$