Biology Application

Written by : Robbert Appel, Jessica Rilly, Jordan Talia

Background of why insulin control is important for diabetic patients
Diabetes mellitus is a disease of the endocrine system where the body cannot control blood glucose levels. There are two general classifications of diabetes:

Type I (also known as juvenile diabetes)


 * Genetic predisposition and/or an autoimmune attack destroys T-cells of pancreas
 * Body cannot produce insulin to regulate blood glucose

Type II
 * Most common form of diabetes and has reached epidemic status in the United States
 * Usually caused by lifestyle
 * Obesity reduces body's responsiveness to insulin

Treatment for both types of diabetes may include exercise, dieting, oral medications, or insulin injections. Most insulin dependent diabetics follow a management plan that requires frequent testing of blood glucose levels and then injection of a prescribed dose of insulin based on the blood glucose level. However, the downside of this treatment method is that there is no predictive control. If blood glucose levels are falling and insulin is administered, a hypoglycemic episode may occur. Recent biomedical advancements have resulted in continuous blood glucose monitoring devices as well as insulin pumps. Continuous monitoring allows for finer blood glucose control and can help predict fluctuations in the blood glucose level. Insulin pumps replace the need to administer insulin injections by automatically injecting a prescribed dose, however it requires blood glucose level input from the patient. In the future, insulin pumps and continuous blood glucose monitors may be integrated forming a closed loop control system which will can replace the body's own faulty control system.




 * Figure 1: Control Schematic of Insulin Infusion

Mathematical model for a closed loop insulin delivery system
The following set of differential equations are known as the Bergman "minimal model":

$$ \frac {dG}{dt}\ = -p_1G-X(G-G_b)+ \frac {G_{meal}}{V_1}\ $$

$$ \frac {dX}{dt}\ = -p_2X+p_3I $$

$$ \frac {dI}{dt}\ = -n(I+I_b)+ \frac {U}{V_1}\ $$

Where:

G = deviation variable for blood glucose concentration

X = deviation variable for insulin concentration in a "remote" compartment

I = deviation variable for blood insulin concentration

$$ G_{meal} $$ = a meal disturbance input in glucose

U = the manipulation insulin infusion rate

$$ G_{b} $$ = steady state value of blood glucose concentration

$$ I_{b} $$ = steady state value of blood insulin concentration

Blood parameters include $$ p_1 $$, $$ p_2 $$, $$ p_3 $$, n, $$ V_1 $$(blood volume). These are specific to the blood specimen and must be predetermined.

A linear state space model can be used to express the Bergman equations seen above. The general form for a state space model can be seen below:

$$ \begin{bmatrix} \dot{x_1}     \\ \vdots \\ \dot{x_n} \end{bmatrix} = \begin{bmatrix} a_{11}     & \cdots & a_{1n}      \\ \vdots & \ddots & \vdots \\ a_{n1}     & \cdots & a_{nn} \end{bmatrix} \begin{bmatrix} x_1     \\ \vdots \\ x_n \end{bmatrix} + \begin{bmatrix} b_{11}     & \cdots & b_{1m}      \\ \vdots & \ddots & \vdots \\ b_{n1}     & \cdots & b_{nm} \end{bmatrix} \begin{bmatrix} u_1     \\ \vdots \\ u_m \end{bmatrix} $$

$$ \begin{bmatrix} y_1     \\ \vdots \\ y_r \end{bmatrix} = \begin{bmatrix} c_{11}     & \cdots & c_{1n}      \\ \vdots & \ddots & \vdots \\ c_{r1}     & \cdots & c_{rn} \end{bmatrix} \begin{bmatrix} x_1     \\ \vdots \\ x_n \end{bmatrix} + \begin{bmatrix} d_{11}     & \cdots & d_{1m}      \\ \vdots & \ddots & \vdots \\ d_{r1}     & \cdots & d_{rm} \end{bmatrix} \begin{bmatrix} u_1     \\ \vdots \\ u_m \end{bmatrix} $$

In general:

$$ \dot{x} = Ax + Bu $$

y = Cx + Du

Where:

x = states

u = inputs

y = outputs

A = $$ \begin{bmatrix} -p_1     & -G_b & 0      \\ 0 & -P_2 & P_3 \\ 0     & 0 & -n \end{bmatrix} $$

B = $$ \begin{bmatrix} 0     & \frac{1}{V_1}       \\ 0 & 0 \\ \frac{1}{V_1}      & 0 \end{bmatrix} $$

C = $$ \begin{bmatrix} 1 & 0 & 0    \\ \end{bmatrix} $$

D = $$ \begin{bmatrix} 0  \\ 0    \\ \end{bmatrix} $$

Using this general formula, we can deconstruct the Bergman equations as a linear state space model. The first input is the insulin infusion and the second input represents the meal glucose disturbance.

First Input:

$$ \begin{bmatrix} \dot{G}     \\ \dot{X} \\ \dot{I} \end{bmatrix} = \begin{bmatrix} -p_1     & -G_b & 0      \\ 0 & -P_2 & P_3 \\ 0     & 0 & -n \end{bmatrix} \begin{bmatrix} G    \\ X \\ I \end{bmatrix} + \begin{bmatrix} 0     & \frac{1}{V_1}       \\ 0 & 0 \\ \frac{1}{V_1}      & 0 \end{bmatrix} \begin{bmatrix} u_1     \\ u_2 \\ \end{bmatrix} $$

Where

$$ \dot{G} $$ = differential blood glucose concentration

$$ \dot{X} $$ = differential insulin concentration in a "remote" compartment

$$ \dot{I} $$ = differential blood insulin concentration

Second Input:

$$ y = \begin{bmatrix} 1 & 0 & 0    \\ \end{bmatrix} G + \begin{bmatrix} 0 & 0    \\ \end{bmatrix} \begin{bmatrix} u_1   \\ u_2   \\ \end{bmatrix} $$

Where: $$ \begin{bmatrix} u_1   \\ u_2   \\ \end{bmatrix} = \begin{bmatrix} U-U_b     \\ G_{meal}-0   \\ \end{bmatrix} $$

Example Set of Parameters
Gb = 4.5 mmol/liter

Ib = 4.5 mU/liter

V1 = 12 liters

p1 = 0/min

p2 = 0.025/min

p3 = 0.0000013 mU/liter

n = 5/54 min-1

It is important to keep track of units when using these parameters. The concentrations listed above are in mmol/liter, but the glucose disturbance has units of grams. Therefore, it is necessary for us to apply a conversion factor of 5.5556 mmol/grams to the Gmeal term. Using these variables solve one can solve for the steady states, and calculate the basal insulin infusion rate (Ub) such that is is equal to 16.1667 mU/min. For these parameters, the resulting state space model is

$$ A = \begin{bmatrix} 0    & -4.5 & 0      \\ 0 & -0.025 & 0.000013 \\ 0      & 0 & \frac{-5}{54} \end{bmatrix} $$

$$ B = \begin{bmatrix} 0     & 0.4630      \\ 0 & 0 \\ \frac{1}{12}      & 0 \end{bmatrix} $$

It is common practice in the U.S. to describe glucose concentration in units of mg/deciliter as opposed to mmol/liter. Therefor, the units will be converted from mmol/liter to mg/deciliter. The molecular weight of glucose is 180g/mol, and therefore one it is necessary to multiply the glucose state (mmol/liter) by 18, so that the measured glucose output obtained will be in units of mg/deciliter. The following state-output relationship will handle that:

$$ C = \begin{bmatrix} 18     & 0 & 0      \\ \end{bmatrix} $$

$$ D = \begin{bmatrix} 0 & 0     \\ \end{bmatrix} $$

Through Laplace transforms it will be found that the process transfer function is :

$$  G_{p}(s) = \frac {-3.79}{(40s + 1)(10.8s+1)s} \ $$

The disturbance transfer function due to pole/zero cancellation is simply :

$$  G_{d}(s) = \frac {8.334}{s} \ $$

However, in reality glucose does not directly enter the blood stream. There is a "lag time" associated with the processing of glucose in the gut. It must first be processed here before entering the blood. However, it can be modeled as a first-order function, with a 20-minute time constant. This modifies the above equation for the disturbance transfer function to include the lag in the gut such that:

$$  G_{d}(s) = \frac {8.334}{s(20s+1)} \ $$

Desired Control Performance
The steady-state glucose concentation of 4.5 mmol/liter corresponds to the glucose concentration of 81 mg/deciliter. A diabetic patient, in order to stay healthy, must keep their blood glucose concentration above 70 mg\deciliter. If the blood glucose concentration falls below 70 mg/deciliter the patient may be likely to faint, as this is a very typical short-term symptom of hypoglycemia. The insulin infusion rate (maniuplated input) cannot fall below 0, and this constraint must be set in simulations. Numerous different control strategies can be used. The equation given for the process function above can be simplified down to the following form and a PD or PID controller can be used.

$$ G_{p}(s) = \frac {k_{p}}{(tau_{p} + 1)s} $$

A diabetic will know when they are consuming a meal, and therefore when their blood glucose concentration may rise. Therefore a feed-forward control system may be desired.