83
MSc thesis Biosys Chair group: Biobased Ch Modelling a t mellitus patie physiological Marco Saglibene March, 2015 Im stems Engineering hemistry and Technology (BCT) type 1 diabetes ent based on l knowledge mage: http://werthecure.com )

Modelling a type 1 diabetes mellitus patient based on physiological knowledge

Embed Size (px)

Citation preview

Page 1: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

MSc thesis Biosystems Engineering

Chair group: Biobased Chemistry and Technology (BCT)

Modelling a type 1

mellitus patient based on physiological knowledge

Marco Saglibene

March, 2015

Image:

MSc thesis Biosystems Engineering

Chair group: Biobased Chemistry and Technology (BCT)

type 1 diabetes

mellitus patient based on physiological knowledge

Image: http://werthecure.com

Chair group: Biobased Chemistry and Technology (BCT)

diabetes

Page 2: Modelling a type 1 diabetes mellitus patient based on physiological knowledge
Page 3: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

i

Modelling a type 1 diabetes

mellitus patient based on

physiological knowledge

Course title : MSc thesis Biosystems Engineering

Course code : BCT-80436

Study load : 36 credits

Report number : 003BCT

Date : March 10th, 2015

Student : Marco Saglibene

Registration number : 81-05-31-724-210

Study programme : Biosystems Engineering (MAB)

Supervisor : dr. ir. Gerard van Willigenburg

Examiner : dr. ing. Rachel van Ooteghem MSc.

Chair group : Biobased Chemistry and Technology (BCT)

Gerda Bos

Bornse Weilanden 9

6708 WG Wageningen

Telephone: +31 (317) 48 06 94

Email address: [email protected]

This report (product) is produced by a student of Wageningen University as part of his

MSc-programme. It is not an official publication of Wageningen University or

Wageningen UR and the content herein does not necessarily represent any formal

position or representation of Wageningen University.

Copyright © 2015 All rights reserved. No part of this publication may be reproduced

or distributed in any form of by any means, without the prior consent of the author.

Page 4: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

ii

Page 5: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

iii

Abstract Type 1 Diabetes Mellitus is a chronic condition affecting the blood glucose

concentration due to the body’s inability to produce the hormone insulin. The

problem is that currently the patient controls the insulin doses which generally

results in suboptimal blood glucose levels. The goal is that an artificial pancreas is

created that consists out of a control algorithm combined with an already existing

continuous subcutaneous insulin infusion pump and a continuous subcutaneous

glucose sensor. The purpose of the research is to find an accurate model that can

be used to design a reliable control algorithm.

Clinical data was obtained of two individuals. Two versions of the Bergman model

and four versions of the Sorensen model were examined. They were combined

with three meal uptake patterns. Examination was done based on three datasets.

The first was used to estimate the parameters after their sensitivity was determined.

Parameter estimation was done based on minimization of the sum of squared

errors between the measured and the modelled blood glucose concentration. The

second dataset concerned a different day of the same person, and the third

concerned a different person.

After parameter estimation the sum of squared errors was smallest for meal uptake

pattern spread1, a trapezoidal digestion rate pattern, but the measured blood

glucose pattern is different after dinner than after breakfast and lunch while the

modelled blood glucose has the same pattern for all three events. Combining this

meal uptake pattern with the Sorensen-plasma-blood model yielded the smallest

sum of squared errors. This is the Sorensen model with added dynamics that

describe the course from subcutaneous to plasma while taking blood, and not

tissue, as output of the model. However, the fit with the measurement data is poor,

especially for severe hypo- and hyperglycaemia.

None of the models was able to accurately predict future blood glucose levels

and therefore none of the models can be used to design a control algorithm for

an artificial pancreas.

Key words: Diabetes, model, Bergman, Sorensen, meal uptake, clinical data

Page 6: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

iv

Page 7: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

v

Table of Contents

1 Introduction ........................................................................................................................................... 1

1.1 Background ................................................................................................................................. 1

1.2 Goal ............................................................................................................................................... 2

1.3 Problem description.................................................................................................................... 3

1.4 Purpose ......................................................................................................................................... 3

1.5 Model availability ........................................................................................................................ 3

1.6 Research questions ..................................................................................................................... 4

1.7 Demarcation................................................................................................................................ 4

2 Materials and methods ....................................................................................................................... 5

2.1 Background blood glucose kinetics ........................................................................................ 5

2.2 Clinical data ................................................................................................................................ 5

2.3 Background of the Bergman and Sorensen models ............................................................ 7

2.3.1 Glucose units ........................................................................................................................... 7

2.3.2 Bergman model ...................................................................................................................... 8

2.3.3 Sorensen model .................................................................................................................... 11

2.4 Data preparation ...................................................................................................................... 15

2.4.1 Used software ........................................................................................................................ 15

2.4.2 Adapting data ...................................................................................................................... 16

2.4.3 Used datasets ........................................................................................................................ 18

2.5 Adding meal uptake dynamics ............................................................................................. 20

2.6 Model parameters, initial state values and meal parameters ......................................... 23

2.6.1 Parameter estimation .......................................................................................................... 23

2.6.2 Determine parameter sensitivity ........................................................................................ 25

2.6.3 Repeating the sensitivity determination and estimate parameters ........................... 26

2.7 Comparing the outputs ........................................................................................................... 27

3 Results ................................................................................................................................................... 29

3.1 Datasets ...................................................................................................................................... 29

3.2 Meal uptake patterns .............................................................................................................. 31

3.3 Models ......................................................................................................................................... 33

4 Discussion ............................................................................................................................................. 41

4.1 Time delays ................................................................................................................................. 41

4.2 Black, grey and white box modelling ................................................................................... 41

4.3 Meal uptake patterns .............................................................................................................. 42

4.4 Missing dynamics ...................................................................................................................... 43

4.5 Differences between the models .......................................................................................... 44

4.6 Predicting future glucose concentrations ............................................................................ 44

5 Conclusions.......................................................................................................................................... 47

6 Recommendations ............................................................................................................................ 49

References .................................................................................................................................................... 51

Appendices .................................................................................................................................................. 57

Page 8: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

vi

Page 9: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

1

1 Introduction

1.1 Background

According to the World Health Organization (WHO, 2014) diabetes mellitus is a

chronic disease in which the blood glucose (BG) concentration increases, which is

called hyperglycaemia, due to either an insufficiency in the production of insulin

by the pancreas, which is type 1 diabetes mellitus (T1DM), or to an insufficiency of

the response of the body to insulin, which is type 2 diabetes mellitus (T2DM). T1DM

and T2DM are the main types of diabetes, but there are others, e.g.:

1. Gestational diabetes, a precursor of T2DM in which woman have increased BG

levels during pregnancy (WHO, 2014)

2. Maturity-onset diabetes of the young, or MODY, a dominantly inherited form of

T2DM diagnosed usually before 25 years of age (Shields et al., 2010).

3. Latent autoimmune diabetes of adult onset, or LADA, a slowly progressing form

of T1DM diagnosed usually after 40 years of age (Carlsson et al., 2000).

The current research is focussed on T1DM. It is known that of individuals that are

genetically susceptible the immune system self-destructs the � cells in the Islets of

Langerhans of the pancreas (Eurodiab, 2000), but until recently the cause for this

self-destruction was unknown. However, Kostic et al. (2015) found alterations to the

gut microbiome prior to the onset of T1DM. Normally, � cells produce the hormone

insulin when the BG concentration becomes too high. Therefore, people suffering

from T1DM need other sources of insulin to control their BG level. When the BG

concentration is chronically too high complications like blindness, failure of the

kidneys and the nervous system resulting in amputations of limps may occur

(Boulton et al., 2005 and Dassau et al., 2013). When the externally admitted

amount of insulin is not fully correct hypoglycaemia can occur. This means the BG

concentration becomes too low and the patient can slip into a coma and die

(Shapiro et al., 2000).

In some countries T1DM is one of the most common chronic diseases amongst

children, but the disease can also emerge during adulthood (Hovorka et al., 2010).

The number of incidences in Europe in which T1DM is diagnosed has been

increasing the last decades and the trend is that it keeps increasing during the

next decades (Patterson et al., 2009).

The needed insulin for T1DM patients can be made artificially (Katsoyannis et al.,

1967) and can be administered in multiple ways. For example it can be

administered with an insulin pen (Hörnquist et al., 1990), by inhalation (Skyler et al.,

Page 10: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

2

2001) or with a continuous subcutaneous insulin infusion pump, which can even be

extended with a continuous subcutaneous glucose sensor, making this the most

advanced option at the moment (Dassau et al., 2013). However, in all cases the

patient ultimately controls the insulin dose which generally results in suboptimal BG

levels. When applying an amount of insulin the patient has to take into account

how much active insulin still is present in his body while estimating the amount of

carbohydrates in the upcoming meal (Dassau et al., 2013). The glycosylated

hemoglobin level, often referred to as ���1� level, which is a measure for long-

term BG control, is even for patients equipped with an insulin pump larger than 8%

(Dassau et al., 2013) while according to the American Diabetes Association the

recommended maximum level is below 7%. This corresponds with an average BG

level of 8.6 ���� �� (El-Khatib et al., 2010). The effects of hypoglycaemia are

acute (Roy and Parker, 2007). Starting at 2.8 ���� �� the glucose uptake of brain

cells starts to cease resulting in a coma (Sorensen, 1985). This is the reason why

many diabetics prefer underinsulinization, especially during the night, resulting in

BG levels at the high end or above normoglycaemia and therefore resulting to an

excessive glycosylated hemoglobin level (Renard et al., 2010). This causes the life

expectancy of diabetics to be shortened by as much as ten years (Percival et al.,

2011). When the BG concentration is between 3.9 and 8 to 10 ���� �� the

patient is normoglycaemic (Luijf et al., 2013 and Breton et al., 2012).

1.2 Goal

The goal is to increase the quality of life of T1DM patients to equal that of non-

diabetics. Therefore the ultimate research goal is to find a way to prevent the

emergence of diabetes. Until this has become a reality the focus is on finding a

cure for diabetes. One possibility is to try to repair or rebuild the damaged tissue.

For example by remaking β cells by transplantation of stem cells (Voltarelli et al.,

2007) or to transplant the Islets of Langerhans (Shapiro et al., 2000). Another

possibility is create an artificial pancreas (AP). Since the 1960s attempts are made

to create such a device (Kadish, 1963). An AP consists out of an continuous insulin

infusion pump, a continuous subcutaneous glucose sensor and a control algorithm

to determine the amount of insulin that has to be infused (Cobelli et al., 2011).

Although future patients equipped with an AP still have to carry a device, their BG

levels would be within normoglycaemia, or at least closer to it because the fear of

hypoglycaemia is eliminated. Furthermore, the quality of life increases because

the patient no longer needs to check his BG concentration, count the amount of

carbohydrates in a meal and he no longer needs to decide how much insulin has

to be administered (Dassau et al., 2013).

Page 11: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

3

1.3 Problem description

Fifty years after the pioneering work of Kadish (1963) there is still no AP available.

Insulin pumps and glucose sensors are commercially available (Dassau et al.,

2013), however there is no adequate control algorithm (Bequette, 2005). The

control algorithm has to adjust the insulin infusion rate based on the sensed BG

concentration and, more importantly, on an accurate model. It is very important

the model is accurate because the model determines for an important part the

insulin infusion strategy which in turn determines the future BG level of the patient

(Cobelli et al., 2011).

In literature many studies based on simulation were found, for example Magni et

al. (2007) and Wilinska et al. (2010), but also studies based on animals were found,

for example El-Khatib et al. (2009) with swines and Bergman et al. (1985) with

canines. Studies using human clinical data were less abundant especially studies

using human subcutaneous clinical data. Therefore the problem is that it is

unknown whether models exist that describe accurately the subcutaneously

measured human BG concentration with a subcutaneous glucose sensor.

1.4 Purpose

If an accurate model is found, a reliable control algorithm can be designed

enabling an AP. Therefore, the purpose of the current research is to evaluate

models found in literature against subcutaneously measured BG values of humans.

If an accurate model is found it can be used to design a controller for an AP.

1.5 Model availability

Balakrishnan et al. (2011) published an article in which they presented an extensive

list of models they had found in literature. The models were divided in two

categories: data-driven and knowledge-driven models. Data-driven, or black box,

models simply relate the input to the output. However, no insight in the insulin-

glucose system is given by these models since they are not based on physiology.

Two examples of black box models are Van Herpe et al. (2006) with an ARX

(autoregressive exogenous input) model and Finan et al. (2008) with AR

(autoregressive), ARX and ARMAX (autoregressive moving average exogenous

input) models.

Knowledge-driven models are based on physiology and are divided by

Balakrishnan et al. (2011) in two categories: lumped (or semi-empirical) models

and comprehensive models. Lumped models consist out of a limited number of

equations because various organs and tissues are lumped into a limited number of

Page 12: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

4

compartments. The comprehensive models are complex because the detailed

physiology is considered. The various organs and tissues are modelled separately,

giving also insight into their mutual interactions.

Balakrishnan et al. (2011) identifies seven lumped model families and three

comprehensive model families. The lumped model most used in literature is

Bergman’s minimal model (Bergman et al., 1979) and has been modified many

times, for example the version of Farmer Jr. et al. (2009) that shows Bergman’s

minimal model adapted for T1DM conditions. The Sorensen model (Sorensen,

1985), based on work of Guyton et al. (1978), is a complicated and detailed

model. Because of its complexity only few researchers have investigated the

modelling and control of the Sorensen model according to Kovács and Kulcsár

(2007).

For the current research the Bergman and Sorensen models were chosen. The

Bergman model because of its scientific popularity and the Sorensen model

because of its level of detail. Also, both are members of the model family with the

most recent publications (Balakrishnan et al., 2011).

1.6 Research questions

In order to pursue the purpose the following research questions were set forth:

1. Do the models found in literature accurately describe the subcutaneously

measured blood glucose concentration?

2. Can the accuracy of the models be improved by parameter estimation?

3. Is the uptake of carbohydrates accurately described?

4. Are the models accurate enough to use for controller design?

1.7 Demarcation

The current research is demarcated by validating the models only for T1DM

patients because of data availability. These diabetic patients do not produce any

insulin and need all their insulin from a exogenous source (Parker et al., 2001).

Due to the limited amount of time, the research was only focused on the model of

Bergman (Bergman et al., 1979) in the adapted version presented by Farmer Jr. et

al. (2009) and a version of the model of Sorensen created by joining the model

versions presented by Sorensen (1985) and by Parker et al. (2000).

Page 13: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

5

2 Materials and methods

2.1 Background blood glucose kinetics

Healthy individuals produce the hormones insulin and glucagon to keep their BG

concentration within the homeostatic range. Insulin lowers the BG concentration

by promoting the uptake of glucose by body cells and the liver. When the uptake

capacity of the liver is reached, insulin is responsible for the conversion of glucose

to fat (Srinivasan et al., 1970). Insulin is also responsible for the uptake of fatty- and

amino acids in the liver, which is needed for the liver to be able to produce

glucose. Glucagon, which is released when the blood glucose levels are low,

stimulates the hepatic glucose production. T1DM patients are incapable of

producing insulin, but glucagon production is intact (Farmer Jr. et al., 2008).

Glucose enters the blood stream through the gut wall by the uptake of the

carbohydrates of a meal.

Because T1DM patients do not produce insulin, their BG concentrations can

become very high. The kidneys start removing glucose from the blood (Lehmann

and Deutsch, 1992). This renal excretion results in frequent urination called polyuria,

which in turn results in excessive thirst, called polydipsia (Sorensen, 1985). When the

BG concentration is high and the insulin concentration is low the human BG system

can become unstable: ketoacidosis. Although there is enough glucose present,

due to the lack of insulin the body cells cannot use it. To sustain in its energy needs

the body starts to burn fat, which results in a drop of the body’s acidity. This can

become deadly (Farmer Jr. et al., 2008). Because the body assumes it is burning fat

due to glucose shortage, glucagon is released causing the liver to release glucose

resulting in even higher BG levels. Since the glucagon levels are very high this

deadly spiral can only be interrupted by an infusion of a large amount of insulin to

reach a higher concentration of insulin than of glucagon (Farmer Jr. et al., 2008).

The quantity of insulin is not expressed with an SI unit but with the pharmacological

International Unit of human insulin, abbreviated with �. The definition of this unit is

according to WHO (2010): “ONE INTERNATIONAL UNIT of human insulin is the

activity contained in 0.03846 mg of the international standard for human insulin, by

definition.” This means 26 International Units of human insulin corresponds to 1 ��.

2.2 Clinical data

Two subjects with T1DM were found willing to supply clinical data. Their relevant

details are presented in Table 1.

Page 14: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

6

Table 1. Details of the subjects.

������� � ������� � ���������� �� ��� !�"�!� #� �$ %����! &'�( )(�'�( *+� 61 ,('-. 22 ,('-. *+� �/ ���+�� � 42 ,('-. 9 ,('-. 2��+�� 1.72 � 1.82 � 67� 23.7 23.5 :�*�� 8.2 % 7.5 % *<�!�+� �=��� +=��� � =�<�= 7.5 ���� �� 5.6 ���� �� *<�!�+� ���=> �� �=�� �� � 47 � 46 � *<�!�+� ���=> ��!���>�!��� �"��?� 107 � 172 �

BMI stands for Body Mass Index. Calculated with http://www.voedingscentrum.nl/

nl/mijn-gewicht/heb-ik-een-gezond-gewicht/bmi-meter.aspx. The average blood

glucose level, daily insulin dose and daily carbohydrate uptake was determined

over the period September 1st until November 9th 2014 for KA and September 13th

until November 12th 2014 for AG.

Both subjects have the same continuous subcutaneous insulin infusion pump and

continuous subcutaneous glucose sensor, respectively a Medtronic MiniMed

Paradigm® Veo 554 and an Enlite Sensor. A picture of a similar set is presented in

Figure 1. On http://www.agentek.co.il/files/VEOinstructionguideEnglish.pdf the user

guide is available for download (3-3-2015).

The infusion needle and glucose sensor are placed subcutaneously. The unit of the

sensed data is in A�. The device translates this to a value expressed in ���� ��.

Feasible values are within the 2.2 B 22.2 ���� �� range. Once every six days a

new glucose sensor has to be placed. The target BG range for KA is set to 3.9 B7.8 ���� �� and the alarm level for severe hypoglycaemia starts at 3.3 ���� ��.

In the current research this target range and alarm level value are used

respectively as normoglycaemia and severe hypoglycaemia. Values at or above 22.2 ���� �� are considered severe

hyperglycaemia. Table 1 shows both

subjects are on average within the

normoglycaemic range, although KA

is at the high end.

The insulin pump can be configured

to automatically infuse a basal insulin

level throughout the day. These levels

Figure 1. Insulin pump and glucose sensor. Left: glucose sensor, top right: insulin infusion

set and bottom right: insulin pump. Image source: http://www.diabetes-support.org.uk/

info/wp-content/uploads/veo.jpg

Page 15: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

7

Table 2. Basal insulin levels over the hours of the day for both subjects in � � ��� and the day sum.

�: DD E: DD F: DD �G: DD �D: DD �H: DD Total I* 0.8 0.7 0.7 1.1 1.1 1.5 21.4 � J',�� *% 0.9 0.9 0.7 0.7 0.9 0.9 18.8 � J',��

are presented in Table 2. When the subject wants to consume a meal he has to

estimate the amount of carbohydrates and enter this amount into the Bolus

Wizard® of the insulin pump. This program suggests an amount of insulin to be

infused based on the subject’s estimation of carbohydrates, the current blood

glucose level and an estimation of the amount of active insulin in the body from a

previous bolus and the basal insulin level. Normally a bolus is infused at once, but

the subject can also spread a bolus based on the amount of fat in a meal.

The pump can automatically stop the infusion of basal insulin when the glucose

sensor issues a hypoglycaemic warning. This safety feature is especially important

during the night when many patients fear unnoticed hypoglycaemia (Dassau et

al., 2013).

The used insulin is HUMALOG® U-100 (100 � ���) fast acting human insulin of Eli

Lilly Co. Fast acting insulin is used in combination with insulin pumps. Slower acting

insulin is used when it is not continuously administered, e.g. with an insulin pen

(Farmer Jr. Et al., 2008).

All logged data by the pump can be uploaded to Medtronic from where a

spreadsheet file can be downloaded with the data. From this spreadsheet a new

spreadsheet (file with comma separated values, a .csv file) was created with ten

columns representing respectively: date and time, basal on or off, progressing time

in �KA, sensed BG level in ���� ��, amount of to be consumed carbohydrates in �, normal bolus of insulin in �, spread bolus of insulin in �, length of the spread

bolus of insulin in �KA, raw sensed BG level in A� and the manually measured BG

level in ���� ��. Manually measured BG level with blood was done multiple times

per day by both subjects.

2.3 Background of the Bergman and Sorensen models

2.3.1 Glucose units

In some publication the glucose concentration is indicated as ���� ��, while in

other publication use the unit �� J��. Both refer to an amount of glucose in an

amount of blood. According to Berger and Rodbard (1989) 1 ���� �� L0.056 �� J�� which means the molar mass of glucose is 180 � �����.

For ease of comparison results are expressed in ���� �� in the current research.

Page 16: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

8

2.3.2 Bergman model

The original Bergman model (Bergman et al., 1979) was based on glucose

disappearance during IVGTT in canines. IVGTT, or intravenous glucose tolerance

test, starts after a night of fasting with a glucose injection based on bodyweight,

usually 0.3 � M���. Blood samples are taken frequently, normally 30 times during 180 �KA, and the BG and insulin levels are measured (Bergman, 1979 and Andersen

and Højbjerre, 2003). The model is non-linear and consists out of three ordinary

differential equations (ODE) because the model divides the human in three

compartments: one with insulin in the plasma, one with active insulin that can

interact with the BG and one with the plasma glucose concentration. The

Bergman model was modified many times (Balakrishnan et al., 2011). Farmer Jr. et

al. (2009) presented a modified version suitable for the T1DM condition by

removing the endogenous insulin production and adding exogenous insulin

infusion. Also a meal input was added. This version of the model is presented as

equation 1 up to and including equation 3: JNOPQJP R BA NOPQ S �OPQT (1)

JUOPQJP R BV� OUOPQ B U�Q S V� ONOPQ B N�Q (2)

J$OPQJP R BV� O$OPQ B $�Q B $OPQ OUOPQ B U�Q S WOPQ (3)

Where N represents the plasma insulin level in �� ��, U represents a level

proportional to the insulin concentration, the active insulin, in �KA�� and $

represents the plasma glucose concentration in ���� ��. The inputs are �, which

represents the exogenous insulin source in �� �KA��, and W, which represents the

carbohydrates source, a meal, in ���� �� �KA��. The parameters are presented

in Table 3.

Table 3. Parameters of the Bergman model and their typical default values.

X�!�Y���! Z�/��=� <�=�� [��� V� 0 �KA�� V� 0.025 �KA�� V� 0.000 013 ���� �KA�� A 0.093 �KA�� T 12.0 $� 4.5 ���� �� U� 0 �KA�� N� 15 �� ��

Other variations of the Bergman model that should represent the T1DM condition

were found but their units were incorrect, for example Roy and Parker (2007). The

Page 17: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

9

used current version of the model also had two difficulties that had to be

addressed. The meal input W is in ���� �� �KA��. This was rewritten according to

equation 4:

WOPQ R J�OPQV�

(4)

Now parameter V� defines the blood volume in . The default value is estimated to

a value of 5 (Nadler et al., 1961). The input J�OPQ stands for the amount of

carbohydrates that are taken up each minute in ���� �KA�� which is the second

point of concern because the amount of carbohydrates is typically entered in �

(or ��) by the subject. However, in equation 3 the unit of $OPQ and $� can be

rewritten to �� J��� which automatically changes the unit of J�OPQ to �� �KA��

and the unit of V� to J. Because 1 ���� �� L 0.056 �� J�� the default value of U� becomes 4.5 0.056 R 80 �� J�� (Berger and Rodbard, 1989).

The mentioned changes result in a new variation of the Bergman model. But a

second variation was also made. The administered basal insulin level is not a

constant, see Table 2, and therefore in the second variation the parameter N� was

changed to input \�OPQ. This was done to see whether the output of the model

would better fit the measured values. The first variation is called the Bergman

model, the second variation is called the Bergman-basal model.

The Bergman model in state-space representation is given as equation 5 up to and

including equation 8: J]�JP R BV� ]� S \�V�

(5)

J]�JP R BV� O]� B V�Q S V O]� B VQ (6)

J]�JP R BV� O]� B V�Q B ]� O]� B V�Q S J�V

(7)

,������� R ]� (8)

The Bergman-basal model in a state-space representation is given as equation 9

up to and including equation 12: J]�JP R BV� ]� S \�V�

(9)

J]�JP R BV� O]� B V�Q S V O]� B \�Q (10)

J]�JP R BV O]� B V�Q B ]� O]� B V�Q S J�V�

(11)

,������������� R ]� (12)

The details of both the Bergman and the Bergman-basal model are presented in

Table 4.

Page 18: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

10

Table 4. Details of the Bergman (B1) and Bergman-basal (B2) model. The ������ column

represents the variables of the Bergman model of Farmer Jr. et al. (2009). The �� � of the Type

��� represent the initial state values. �� means the values follow from the measurement data.

^>"� _!�+���= 6� 6� <�=�� 6� 6� <�=�� [��� `P'P( N ]� W'P' ]� W'P' �� �� `P'P( U ]� 0 ]� 0 �KA�� `P'P( 'AJ �\PV\P $ ]� W'P' ]� W'P' �� J�� a'-'�(P(- A V� 0.093 V� 0.093 �KA�� a'-'�(P(- T V� 12.0 V� 12.0 a'-'�(P(- V� V� 0.025 V� 0.025 �KA�� a'-'�(P(- U� V� 0 V� 0 �KA�� a'-'�(P(- V� V 0.000 013 V 0.000 013 ���� �KA�� a'-'�(P(- N� V 15 \� W'P' �� �� a'-'�(P(- V� V� 0 V 0 �KA�� a'-'�(P(- $� V� 80 V� 80 �� J�� a'-'�(P(- V� V 50 V� 50 J NAV\P � \� W'P' \� W'P' �� �KA�� NAV\P J� J� W'P' J� W'P' �� �KA��

The state response of the Bergman and Bergman-basal models are different, as

can be seen in Figure 2 and Figure 3. At a basal level of 1 � b�� the Bergman

model reaches a steady state level of 4 ���� �� while the Bergman-basal model

does not reach steady state in 1000 �KA.

Figure 2. Bergman model response to

an insulin bolus of � � at � � ��� ���.

Figure 3. Bergman-basal model

response to an insulin bolus of � � at

� � ��� ���.

0 200 400 600 800 10003

4

5

6

7

8

Time [min]

Plasma glucose [mmol/L]

0 200 400 600 800 10005

6

7

8

9

10

Time [min]

Plasma glucose [mmol/L]

Page 19: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

11

2.3.3 Sorensen model

The Sorensen model (Sorensen, 1985) is an extensive non-linear model consisting of

eleven ODE’s to describe the glucose subsystem, ten ODE’s to describe the insulin

subsystem and one ODE to describe the glucagon subsystem. However, three

ODE’s of the insulin subsystem describe the endogenous insulin production and

secretion which are to be omitted for the T1DM condition (Steil et al., 2005)

resulting in the version of Parker et al. (2000). The model divides the human body

into compartments. For the glucose subsystem these are: brain*, heart and lungs,

gut, liver, kidney and periphery*. For the insulin subsystem these are: brain, heart

and lungs, gut, liver, kidney and periphery*. The compartments marked with a *

consist out of the subcompartments interstitial fluid space and vascular blood

water space. The other compartments are assumed homogeneous because they

consist out of one well-mixed space (Balakrishnan et al., 2011). The flow diagram of

the Sorensen model created by Farmer Jr. et al. (2009) is presented in Appendix A.

The number of equations and subequations make the model hard to

comprehend, as can be seen in Appendix B. Therefore, the Sorensen model was

rewritten to state-space form while incorporating all subequations in their

corresponding equation and grouping parameters as much as possible. See

equation 13 up to and including equation 31. The glucose subsystem is given as

equation 13 up to and including equation 21, equation 29 and equation 30, the

insulin subsystem is given as equation 22 up to and including equation 28 and the

glucagon subsystem is given as equation 31. The transformation to state space,

units and default parameter values are given in Appendix C. J]�JP R cB V V�

B V�V�� V�

d ]� S V�V�� V�

]� S V V�

]� (13)

J]�JP R 1V��

]� B 1V��

]� B V��V�

(14)

J]�JP R V V�

]� B V��V�

]� S V��V�

]� S V��V

] S V�V�

] B V� V�

(15)

J]�JP R V��V

]� B V��V

]� B V��V

tanhOV�� ]� B V�� V�Q B V��V

i�- ]� j V�

J]�JP R V��V

]� B V�� S V��V

]� S V��V

i�- ]� k V�

(16)

J]JP R V��V

]� B V��V

] S V��V

]� B V�� VV

] B V�� V�V

]

tanh cV�V�

] B V� V d B V�� V�V

]�� ]��

tanh cVV�

] B V V�d tanhOV� ]� Q S V�� OV� B VQV

(17)

J]JP R V�V�

]� B cV�V�

S V�V�� V�

d ] S V�V�� V�

]� (18)

Page 20: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

12

J]�JP R 1V��

] B c 1V��

S V�� V�V� V�

d ]� B V�� V��V� V�

]� tanh cV��V�

]� B V�� V�d (19)

J]�JP R V��V�

]� B V��V�

]� S J� B V��V�

(20)

J] JP R B 1V��

] S V�V��

tanh cVV�

]��d (21)

J]��JP R B V��V�

]�� S V��V�

]�� (22)

J]��JP R V��V��

]�� B V�V��

]�� S V� V��

]�� S V��V��

]�� S V��V��

]�� S 1V��

\� (23)

J]��JP R V� V��

]�� B V� S V� V� V��

]�� (24)

J]��JP R V�� B V� V��V�

]�� B V��V�

]�� S V� B V� V�V�

]� S 1 B V�V�

\� (25)

J]��JP R V��V��

]�� B cV��V��

S V��V�� V��

d ]�� S V��V�� V��

]� (26)

J]�JP R 1V��

]�� S c V�� V��V�� V�� B V�� S V�� V�� V��

B 1V��

d ]� S 1V��

\� (27)

J]�JP R V�V��

]�� B V�V��

]� (28)

J]��JP R B 1V��

]�� B V�V��

tanh cV�V�

]�� B V� V�d S V V��

(29)

J]��JP R B 1V�

]�� S 12 V�V�

tanhOV� ]� Q B 12 V�V�

(30)

J]� JP R B V��V��

]� B V�� V��V��

tanh cV��V��

]�� B V�� V��d B V�� V�V�� tanh cV��V��

]� B V�� V� d S V�� OV�� B V�QV��

(31)

Because the model represents the various organs of the body as compartments,

the modelled BG concentration of each of these compartments can be chosen

as output. Normally the BG level in the heart and longs compartment is chosen as

output (Kovács and Kulcsár, 2007), but the model also has a peripheral tissue

compartment containing muscle and adipose (fat) tissue. To evaluate whether this

compartment corresponds better to the measured subcutaneous glucose values,

it was also taken as output. Therefore, the rewritten version of the Sorensen model

is completed by equation 32 for the Sorensen-blood model and by equation 33 for

the Sorensen-tissue model. ,�������������� R ]� (32) ,��������������� R ]� (33)

There are three inputs to the Sorensen-blood and Sorensen-tissue models. In the

current research \�OPQ and \�OPQ were always 0 �� �KA�� because no insulin was

administered intravenously and the pancreas does not produce insulin,

respectively. Input \�OPQ represents the subcutaneously administered insulin in �� �KA��. Though, this poses a difficulty. When the insulin is administered

Page 21: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

13

subcutaneously it takes some time before it is absorbed into the bloodstream

(Søeborg et al., 2009). Parker et al. (2000) do not give an equation for \�OPQ, while

they do give equations for all other metabolic sources and sinks. Therefore, the

model presented by Shichiri et al. (1998) that describes the course from

subcutaneous injection until entering the plasma was used. See equation 34 up to

and including equation 36. JUOPQJP R NNlOPQ B � UOPQ (34)

JmOPQJP R � UOPQ B OV S �Q mOPQ (35)

nOPQ R V mOPQ (36)

Where U and m represent the subcutaneous insulin doses in ��. n represents the

plasma insulin dose in ��. �, V and � represent rate constants in �KA�� with values

of 0.017, 0.048 and 0.0029, respectively and NNl is the insulin infusion rate in �� �KA��. The course of the insulin entering the plasma after the infusion is depicted in

Figure 4. Note that is takes about 300 �KA before the insulin infusion rate is back at

the basal level after the infusion pulse. It can also be seen that the basal amount

of insulin entering the plasma is smaller than the basal amount that was infused

because a portion of the insulin is degraded before it enters the plasma.

These dynamics were written to state-space form and were added to the

Sorensen-blood and Sorensen-tissue models by addition of equations 37 and 38

and by rewriting equation 27 to equation 39 resulting in the Sorensen-plasma-

blood, with equation 40, and Sorensen-plasma-tissue, with equation 41, models. J]��JP R \� B V� ]�� (37)

J]��JP R V� ]�� B OV�� S V��Q ]�� (38)

J]�JP R 1V��

]�� S c V�� V��V�� V�� B V�� S V�� V�� V��

B 1V��

d ]� S 1V��

V�� ]�� (39)

,��������������������� R ]� (40) ,���������������������� R ]� (41)

The responses of the Sorensen-blood, Sorensen-tissue, Sorensen-plasma-blood and

Sorensen-plasma-tissue models to an insulin bolus are depicted in Figure 5 and

Figure 6. It can be seen that the Sorensen-plasma-blood and Sorensen-plasma-

tissue models respond slower than the Sorensen-blood and Sorensen-tissue models

because the added dynamics, equation 37 and equation 38, causes the insulin to

enter the blood stream during a longer period of time.

The difference between the two Blood and the two Tissue versions of the Sorensen

model is that the BG level of the Tissue versions is lower than of the Blood versions.

After closer examination it can also be seen that the response of the Blood versions

is slightly faster than the Tissue versions.

Page 22: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

14

Figure 4. Infused insulin gets absorbed

and enters the plasma. The infused insulin

pulse at � � �� ��� is �� �.

Figure 5. Sorensen-blood and Sorensen-

tissue model response to an insulin bolus

of � � at � � ��� ���.

Figure 6. Sorensen-plasma-blood

and Sorensen-plasma-tissue

model response to an insulin bolus

of � � at � � ��� ���.

Lastly some ambiguities were found between the version of Sorensen (1985) and

Parker et al. (2000) of the Sorensen model. For the sake of completeness and future

research they are presented here in the format of Parker et al. (2000), together

with the used version:

1 Sorensen: �� R p 71 S 71 tanhq0.11 O$�� B 460Qr i�- $�

� j 460 ��

��0.872 $�� B 330 i�- $�

� k 460 ��

��

s. Parker et al.: �� R p71 S 71 tanhq0.011 O$�

� B 460Qr i�- $�� j 460 ��

��0.872 $�� B 300 i�- $�

� k 460 ��

��

s.

100 200 300 400 5000

20

40

60

80

100

120

Time [min]

Insu

lin [

mU

]

Infused insulin

Insulin to plasma

0 200 400 600 800 10002

3

4

5

6

7

8

Time [min]

Blood glucose level [mmol/L]

Peripheral tissue glucose level [mmol/L]

0 200 400 600 800 10002

3

4

5

6

7

8

9

Time [min]

Blood glucose level [mmol/L]

Peripheral tissue glucose level [mmol/L]

Page 23: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

15

Current: �� R p71 S 71 tanhq0.011 O$�� B 460Qr i�- $�

� j 460 ��

��0.872 $�� B 330 i�- $�

� k 460 ��

��

s (Sorensen

presents his model in text (version 1) but also as Fortran code (version 2).

Together with the version of Parker et al. (version 3) there are three versions.

Both the values 0.011 and 330 appeared in two versions while the values 0.11

and 300 appeared only once.

2 Sorensen: � �

��R ON!� t! S N"� t" S N�� t� S N#� t# B N$� t$ S à % Q �

%��.

Parker et al.: � �

��R ON!� t! S N"� t" S N�� t� S N#� t# B N$� t$ B à % Q �

%��.

Current: : � �

��R ON!� t! S N"� t" S N�� t� S N#� t# B N$� t$ S à % Q �

%�� (intravenous

injected insulin increases the amount of insulin).

3 Sorensen: Γ#� R ��

������

&�

�����

���

.

Parker et al.: Γ#� R ��

������

&�

��

��� ��

.

Current: Γ#� R ��

������

&�

�����

���

(because then the units correspond to each other).

4 Sorensen: the units of the insulin subsystem is �� J��.

Parker et al.: the units of the insulin subsystem is �� ��.

Current: the units of the insulin subsystem is �� �� (because only then the

units correspond).

2.4 Data preparation

2.4.1 Used software

The calculations were done by MathWorks® Matlab® 7.9.0.529 (R2009b) running

on x86_64 GNU/Linux OpenSUSE 13.2. The developed script ( 36 files and over 11 000 lines of code) can be obtained via the chair group (contact details are on

the cover sheet). The ODE solver ode23s was used because the systems were too

stiff for higher order solvers.

Because insulin boluses are infused at once, they become pulses. These pulses

were sometimes unnoticed by the ODE solver. To overcome this, a script was

made that stopped the ODE solver before each pulse and changed the states

according to the pulse properties.

Page 24: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

16

2.4.2 Adapting data

The raw measurement data had to be prepared. The insulin pump logs data once

every five minutes, accept when an action occurs. An action could be the

entering of carbohydrates by the subject or a change of the basal rate (see Table

2). Then one or more lines of data are logged and the five minute counter is reset.

A script was made that prepares the data by creating one line of data for every

minute. If the raw data would have a measurement gap larger than ten minutes a

subdataset was created. If this subdataset consists at least 24 hours of data it was

saved, smaller subdatasets were discarded. Furthermore, it happened quite often

that the glucose sensor does not return any value resulting in a logged value of

zero. This was solved by maintaining the last correctly measured value. The

measured glucose level with zero data together with the entered amount of

carbohydrates, the subcutaneously infused amount of insulin and measurements

of the blood, is shown in Figure 7. The course with these zero values removed is

presented as Figure 8.

Figure 7. Measurement data with zero

values due to measurement faults.

Figure 8. Measurement data with zero

values replaced by the last correctly

measured value.

Figure 9 shows a close-up of Figure 8. It can be seen that around P R 500 �KA the

measured BG concentration rises but that around P R 580 �KA the carbohydrates

were entered and the insulin bolus was given. This happens when the subject starts

to eat while forgetting to administer a bolus of insulin at the start of the meal. Since

the exact starting moment of the meal is unknown the minimum before the rise

was visually identified and used as starting moment. This was done for all instances.

The result of this is presented in Figure 10. The moment of insulin infusion does not

change because that was the moment the bolus was actually administered.

9.05 9.1 9.15 9.2 9.25 9.3

x 104

0

10

20

30

40

50

60

Time [min]

Basic dataset

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

500 1000 1500 2000 2500 30000

10

20

30

40

50

60

Time [min]

Corrected dataset

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

Page 25: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

17

Figure 9. At the moment the

carbohydrates were entered the

glucose concentration has been rising

for over an hour.

Figure 10. The carbohydrate moment is

moved to the minimum before the

glucose rise while the insulin bolus

remains at the moment it was actually

administered.

Small differences between the measured BG concentration (output data) and the

blood measurements can be seen in Figure 7 up to and including Figure 10. The

maximum difference between them is 1.6 ���� ��. This shows there is a

difference between the subcutaneous and venous BG concentrations. These

measurement errors are not constant as can be seen in Figure 11 with a maximum

difference of 5.5 ���� ��. Since the model output was to be fitted to the

measurement values, these measurement errors play a role. However, because

the measurement values were taken from a working situation they were

neglected. The artificial pancreas will also use a glucose sensor and therefore it will

also have to deal with the same sort of measurement errors.

The raw subcutaneous BG measurements (raw data) are also shown. It can be

seen that no time delay is implemented in the transformation between the raw

and the output data (peaks are aligned on the time axis). This is a simplification

because when blood glucose concentration changes, the subcutaneous glucose

concentration follows with a delay (Rossetti et al., 2010). Figure 11 also shows that

the raw measurements continue when the maximum output concentration of 22.2 ���� �� is reached. Furthermore, the subject can recalibrate the glucose

sensor which shows as a discontinuity between the raw and the output data. Such

a recalibration is also shown in Figure 11.

450 500 550 600 650 700 750 8000

5

10

15

20

25

30

35

40

Time [min]

Corrected dataset

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

450 500 550 600 650 700 750 8000

5

10

15

20

25

30

35

40

Time [min]

Dataset with corrected meal moments

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

Page 26: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

18

Figure 11. Differences between blood measurements and measured glucose. Maximum difference

is �. � ��� � ���. The figure shows the upper limit of the feasible range, ��. � ��� � ���, was

reached at around � � ��� ���. Also a recalibration is shown around � � ���� ���.

2.4.3 Used datasets

Two datasets were chosen of KA and one of AG. The datasets had to start before

breakfast since no meal is consumed and no insulin bolus is administered during

the night. This way the initial state values influence the system least. The dataset

also had to have a minimum length of 24 hours. The difference between

subcutaneous measurements and blood measurements must be small and the

course of the measurements must be similar for both datasets. For KA the dataset

of Figure 7 up to and including Figure 10 was divided in two datasets. The datasets

of KA are presented as Figure 12 and Figure 13 and of AG as Figure 14.

The first dataset of KA, KA1, see Figure 12, starts on November 3rd, 2014 on 04:21

and ends on November 4th, 2014 on 07:55. Breakfast was initiated on 09:11, lunch

on 12:46 and dinner on 19:16. The associated insulin boluses were administered on

09:04, 14:06 and 19:18. At 00:47 and 03:01 a correction bolus was given after the

blood measurements of 00:36 and 03:00 when the BG level was 16.0 and 13.7 ���� ��. Notable is that the measured BG response is similar after breakfast and

lunch, it immediately starts to rise until a maximum is reached and the BG

concentration decreases again, but is very different after dinner. After dinner there

seems to be a very small increase and then a drop of the BG concentration. Then,

200 400 600 800 1000 1200 1400 16000

10

20

30

40

50

Measured glucose concentration [mmol/l]

Subcutaneous glucose measurement [*0.5 nA]

Blood measurement [mmol/l]

Recalibration

Maximum

Page 27: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

19

Figure 12. First dataset of KA (KA1). Figure 13. Second dataset of KA (KA2).

Figure 14. Dataset of AG (AG1).

just after P R 1000 �KA the BG concentration starts to rise again. The same course

was found in the second dataset of KA, KA2, see Figure 13. This dataset seems very

similar to the dataset shown in Figure 12 but some differences can be noticed. The

end of the night until breakfast the BG concentration seemed fairly stable in Figure

12, while it decreased in Figure 13. The BG concentration at the start of breakfast

was similar in both figures, but just before lunch the BG levels were just above

normoglycaemia in Figure 12 while it was nearing the lower boundary of

normoglycaemia in Figure 13. The course after dinner was similar in both figures,

the BG level first increased, then decreased followed by an increase. But

hypoglycaemia occured in Figure 13, just before P R 2500 �KA. Although no

carbohydrates were logged at that moment, chances are that KA ate a banana

to try to increase his BG level. This followed from a conversation with KA. These

carbohydrates were not logged because no insulin bolus was given since the aim

was to rise the blood glucose level. Then followed a more or less oscillating pattern

to hyperglycaemia, 15.1 ���� ��, at around P R 2900 �KA resulting in a correction

500 1000 15000

10

20

30

40

50

60

Time [min]

Dataset with corrected meal moments

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

1500 2000 2500 30000

10

20

30

40

50

60

Time [min]

Dataset with corrected meal moments

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

200 400 600 800 1000 1200 14000

10

20

30

40

50

60

Time [min]

Dataset with corrected meal moments

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

Blood measurement [mmol/l]

Page 28: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

20

bolus. This dataset starts on November 4th, 2014 on 03:12 and ends on November

5th, 2014 on 09:43.

The dataset of AG, AG1, see Figure 14, starts on October 4th, 2015 on 05:05 and

ends on October 5th, 2015 on 07:31. This dataset shows few similarities with the

datasets of KA. KA ate three times a day in both datasets while AG ate multiple

times. KA administered himself one large bolus at the start of each meal while AG

administered over a longer period of time multiple small boluses. Although these

datasets show similar minimum and maximum BG levels for both subjects, it seems

possible that the strategy of AG is beneficial because her average glucose

concentration is 1.9 ���� �� lower than that of KA, as can be seen in Table 1.

2.5 Adding meal uptake dynamics

When the subject enters the amount of carbohydrates, it is logged as a pulse. In

reality the patient eats his meal and the carbohydrates end up in the stomach.

From there the intestines are filled and the carbohydrates are absorbed. The

models used in the current research provide an input for carbohydrates, but the

unit is in �� �KA��. This means the carbohydrates cannot be fed to the models as

a pulse and meal dynamics had to be added to the models to simulate the

uptake in the intestines. Three different meal uptake models, called meal uptake

patterns, were examined. The first one is called spread1 and is based on the rate

of gastric emptying as presented by Lehmann and Deutsch (1992). It is assumed

that there is a linear ascending and descending time. In between there is some

time, depending on the amount of carbohydrates, in which the maximum rate is

achieved. When the amount of carbohydrates in a meal is less than J�� R 10 � the

maximum rate is not achieved and only the ascending and equal sized

descending parts remain.

The maximum digestion rate is given as T��' R 120 ���� b�� which corresponds to T()* R 0.333 � �KA�� and is achieved after P��� R 30 �KA of digesting. According to

Lehmann and Deutsch (1992) the digestion rate acceleration is constant, which

can be calculated according to equation 42.

T��� R T��'P���

R 0.333 � �KA��30 �KA R 0.0111 � �KA�� (42)

When there is only an ascending time P��� and a descending time, meaning the

amount of carbohydrates is less than J�� R 10 �, the digestion halftime P��

, this is the

peak where the highest digestion rate is achieved, can be found by taking the

integral on T���, see equation 43 up to and including 46.

u T��� P JP R���

12 J�� (43)

Page 29: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

21

v12 T��� P�w�

��� R 12 J��

(44)

12 T��� cP��

d� R 12 J�� (45)

P��

R x 12 J��12 T���

(46)

Then, by means of equation 47, the meal spread over time, J������OPQ, was

calculated.

J������OPQ R 12 'yy P i�- 0 z P z P��

J������OPQ R 12 'yy P��

B 12 'yy cP B P��

d i�- P��

j P z 2 P��

(47)

When meal J�� k 10 �, then the maximum digestion rate T()* R 0.333 � �KA�� is

reached. This means the ascending time P��� and the equally sized descending

time are fully used, so P��� R 30 �KA. The length of time the maximum digestion rate

is maintained, P+��, is calculated by means of equation 48.

P+�� R J�� B 10T��'

(48)

This enables the calculation of the meal spread over time J������OPQ for meals with

more than 10 � of carbohydrates by means of equation 49.

J������OPQ R 12 'yy P i�- 0 z P z P��� J������OPQ R T��' i�- P��� j P z P+��

J������OPQ R 12 'yy P��� B 12 'yy OP B P+��Q i�- P+�� j P z P+�� S P���

(49)

Figure 15 shows how four carbohydrate pulses are transformed to be spread over

time. The first carbohydrate pulse at P R 20 �KA is 8 �, the second at P R 340 �KA is 32 �, the third at P R 670 �KA is 12 � and the last pulse at P R 720 �KA is 16 �.

Figure 16 shows the result of spread2 which is based on the figures presented by

Camilleri et al. (1989). In these figures it is assumed that a meal takes P���� R300 �KA to digest at a constant rate. It can be seen in Figure 16 that the maximum

uptake rate is variable. The spreading was calculated by means of equation 50.

J������OPQ R J��P����

i�- 0 z P z P���� (50)

Lastly, Figure 17 shows the result of spread3 which is based on Fisher according to

Farmer Jr. et al. (2009). It assumes an exponential decline in the uptake rate, see

equation 51. J������OPQ R � (��&,�����������- i�- 0 z P z P�������� (51)

Where � is the absorption rate of the meal, default is � R 0.05 �KA��. The digestion

end time, P������, should be chosen as large as possible and was always set to the

largest P in the dataset.

Page 30: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

22

Figure 15. Spreading the amount of carbohydrates according to spread1.

Figure 16. Spreading the amount of carbohydrates according to spread2.

Figure 17. Spreading the amount of carbohydrates according to spread3. Note that the y-

axis differs from Figure 15 and Figure 16.

200 400 600 800 10000

0.1

0.2

0.3

0.4

Time [min]

Amount of carbohydrates [*0.01 g]

Spread carbohydrates, "spread1" [g]

200 400 600 800 10000

0.1

0.2

0.3

0.4

Time [min]

Amount of carbohydrates [*0.01 g]

Spread carbohydrates, "spread2" [g]

200 400 600 800 10000

0.5

1

1.5

2

Time [min]

Amount of carbohydrates [*0.01 g]

Spread carbohydrates, "spread3" [g]

Page 31: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

23

The integral over � gives the meal size J��, see equation 52 up to and including

equation 55.

u � (��&� JP R J��

���������

(52)

v B�� (��&�w�

��������� R J�� (53)

B�� (�&���������B B�� (�

R J�� (54)

� R J�� � (�&���������(�&��������� B 1 (55)

The combination of equation 51 and 55 yield equation 56, which was used to

calculate J������OPQ with spread 3.

J������OPQ R J�� � (�&���������(�&��������� B 1 (��&,�����������- i�- 0 z P z P�������� (56)

Equation 51 can easily be rewritten to equation 57 and then added to the models

as an extra state This was not done due to the amount of extra time that would

have been needed to adapt the Matlab® scripts. JJP J������OPQ R B� J������OPQ {KPb J������O0Q R � i�- 0 z P z P�������� (57)

The equations of this section were adapted to discrete time M and were

implemented into the script. All combinations of spread1, spread2 and spread3

with the Bergman, Bergman-basal, Sorensen-blood, Sorensen-tissue, Sorensen-

plasma-blood and Sorensen-plasma-tissue models were examined during the

research.

2.6 Model parameters, initial state values and meal parameters

The parameters in the original Bergman and Sorensen models resulted from

measurements or were based on data found in literature (Steil et al., 2005). For this

research this meant the model output can be very different from the current

measurements because the model parameters are inappropriate for the current

subjects. So, to evaluate whether the model structure is correct the model

parameters, meal parameters and initial state values, from now on these three

group are addressed to as parameters, were estimated. They were estimated

three at a time and therefore the sensitivity was determined to be able to estimate

the parameters in the order from most sensitive to least sensitive.

2.6.1 Parameter estimation

Least squares parameter estimation has been adopted. To that end the difference

between the measurements and the model output was squared, see equation 58.

This has two benefits, the first is that larger differences are more penalized, the

Page 32: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

24

second is that negative differences are made positive, so negative and positive

differences cannot cancel each other out.

TOVQ R ∑ O}OMQ B ,OM|VQQ�./0� �

(58)

Where T is the sum of squared errors (technically, because the sum is divided by �, TOVQ in equation 58 represents the averaged sum of squared errors) which

depends on the parameter values V. � is the number of measurements in a

dataset, } the measurements at discrete time M and , is the model output at

discrete time M and based on parameter values V.

The objective is to minimize the value of TOVQ. This was done by using the Nelder-

Mead simplex (Nelder and Mead, 1965) incorporated in the Matlab® function

fminsearch. The simplex algorithm can be seen as a A-dimensional geometrical

figure. The dimensions represent the to be optimized parameters. The A S 1 points

creating this figure are called vertices. One vertex represents the origin and the

others define vector directions. The figure is transformed and the current worst

vertex is replaced with another point (Nelder and Mead, 1965). The simplex

algorithm tries to find a minimum. This means parameters are altered causing the

model output to closer resemble the measurements. However, there is no

guarantee that the best value of a parameter is to be found, because it can

happen that the simplex algorithm finds not the global, but a local minimum

(Chelouah and Siarry, 2005). However, although the optimal value might not be

found, TOVQ always becomes smaller or in the worst case remains the same as it

was with the initial parameter value. The simplex algorithm cannot end with a

parameter value resulting in a larger value of TOVQ than the value of TOVQ yielded

with the initial value of the parameter. The simplex algorithm was restricted to

positive parameter values only, except for V�+�1�. Parameter V�+�1� shifts the meal to

an earlier or later moment and is used for spread1, spread2 and spread3.

The simplex algorithm can handle multi-dimensional problems, but the more

dimensions the more time it will take for the simplex algorithm to finish. Not only the

model parameters were to be estimated, but also the initial state values that do

not follow from the measurements. From the measurements one glucose and one

insulin value were obtained, while the models have up to 21 states. Furthermore,

three meal models (spread1, spread2 and spread3) were evaluated. For each

model one parameter was reserved to initiate a shift in time for the meal, V�+�1�,

enabling it to start earlier or later. For spread1 the maximum digestion rate, T��',

was estimated, for spread2 the length of the digestion time, P����, was estimated

and for spread3 the rate of decline, J, was estimated. This results in a maximum for

the Sorensen-plasma-blood and Sorensen-plasma-tissue models. They have 88

parameters, 21 initial state values of which two follow from the measurement data,

and two meal dynamics parameters. This sums up to 109 parameters that have to

Page 33: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

25

be estimated. This leads to a 109 dimensional simplex. Although this could be

solved by the computer, it was estimated to take a very long time to finish.

Therefore, the choice was made to estimate the parameters per three, leading to

a much smaller, and therefore computationally less intensive, three dimensional

simplex. However, the order of estimation is important.

2.6.2 Determine parameter sensitivity

It was chosen that the order of estimation should start with the most sensitive and

end with the least sensitive parameter. To determine the sensitivity differential

analysis was performed (Hamby, 1994). The change of the sum of squared errors

was divided by the relative change of the parameter or initial value resulting in the

sensitivity coefficient, as shown in equation 59.

�� R �TOV�Q�V�

� ΔTOV�Q%ΔV�

R TOV̂�Q B TOV�Q%OV̂� B V�Q (59)

The outcome of equation 59 determined the sensitivity: the largest value indicates

the most sensitive parameter. In equation 59 K stands for the Kth to be estimated

parameter and %ΔV� stands for the relative change of a parameter compared to

the reference value (Hamby, 1994). The reference case is with all parameters at

their default values found in literature, see Table 4 and Appendix C for the default

parameter values of respectively the Bergman and the Sorensen models.

However, determination of �� just for one %ΔV� can give incomplete results due to

non-linearity between the input and output: ΔTOV�Q and %ΔV� (Downing et al.,

1985). Therefore %ΔV� was set to 0.1 %, 1 % and 10 % and at each value the

sensitivity coefficient was calculated again with %ΔV� set once more to 0.1 %, 1 %

and 10 %. This resulted in twelve different values for ��. These values were

averaged and the outcome determined the parameter sensitivity.

The determination of the sensitivity was done with the input signals and the

measured glucose values shown in Figure 18. In this figure the carbohydrates are

not spread. This is because that is part of the estimation. Determination of the

sensitivity was done over the complete dataset. The time period indicated by ‘1’

shows the part used to estimate the parameters. The determination of the

parameter sensitivity took up to eight hours, but the parameter estimation over less

than 900 �KA indicated by ‘1’ took up to more than one day. This was the reason

the parameter estimation was not performed over the whole dataset shown in

Figure 18.

Page 34: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

26

Figure 18. The input signals and measured BG concentration used to determine the

sensitivity (complete figure). The area indicated as ‘1’ (breakfast and lunch) was used for

estimating the model parameters, the meal parameters and the initial values. The area

indicated as ‘2’ (one full day) was used for estimating the meal parameters and the initial

values while the model parameters were as was estimated with ‘1’. The area indicated as

‘3’ is as ‘2’ but now starting at dinner and ending before breakfast the next day.

2.6.3 Repeating the sensitivity determination and estimate parameters

The parameter estimation was done over only a time of fasting (end of the night),

breakfast and lunch, identified by ‘1’ in Figure 18. Therefore, the parameter

sensitivity was performed once more, but now only for the meal parameters and

initial values. The model parameters were set to the estimated parameters V̂,

which were yielded after the parameter estimation over ‘1’. The sensitivity was

determined by averaging the twelve sensitivity coefficients that were yielded over

the period indicated by ‘1’ and the twelve sensitivity coefficients yielded over the

period indicated by ‘3’. This could not have been done at once (by means of the

period indicated by ‘2’) because the initial state values were concerned. The

initials values act as the memory of the system. Therefore the periods ‘1’ and ‘3’

had to be examined as individual datasets because otherwise this memory would

not be effectuated for period ‘3’.

Then the meal parameters and initial values were estimated twice. One time for

dinner until breakfast, the period indicated by ‘3’, and one time for a full day, the

period indicated by ‘2’.

500 1000 1500 2000 2500 30000

20

40

60

Time [min]

Measured glucose concentration [mmol/l]

Carbohydrates [g]

Insulin input [U]

1

2

3

Page 35: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

27

2.7 Comparing the outputs

To be able to compare the determined parameter sensitivities, the �� values are

divided by the largest ��. This results in a sensitivity value of one for the most

sensitive parameter. The other, less sensitive, parameters are given as a fraction

compared to this most sensitive parameter.

Because all possible combinations were examined the number of resulting figures

was 162 of which each figure showed the measured BG values and two modelled

BG values: one based on default parameters and one based on estimated

parameters. The possible combinations is 162 because there were six models, three

meal uptake patterns, three datasets which were divided over three subdatasets.

One subdataset represented breakfast and lunch, the second represented dinner

and the third represented a full day. The three datasets were KA1, KA2 and AG1.

The three meal uptake patterns were spread1, spread2 and spread3. The models

were Bergman, Bergman-basal, Sorensen-blood, Sorensen-tissue, Sorensen-

plasma-blood and Sorensen-plasma-tissue. Modelled output outside the range of 2.2 to 22.2 ��� �� was made to fit this range because the measurement values

are also bounded to this range.

Due to the large number of results, averaging was done. The outcomes were

averaged to show results per dataset, per meal uptake pattern and per model.

Furthermore, figures representing cumulative results were made. An example is

shown as Figure 19 and Figure 20. Figure 19 shows a glucose concentration over

the course of 1 600 �KA. Figure 20 shows the same glucose concentration, but now

in a cumulative view. In this ways the glycaemic situation can easier be assessed.

For example, in Figure 19 it can be seen that between P R 100 and P R 400 �KA,

between P R 1 200 and P R 1 400 �KA and between P R 1 450 and P R 1 550 �KA the

subject was normoglycaemic. However, in the cumulative view it can easier be

seen that the subject was normoglycaemic during 44 % percent of time. The area

between the green and blue line. In this example the subject was during 2.1 % of

time severely hypoglycaemic, during 8.0 % of time hypoglycaemic, during 38 % of

time hyperglycaemic and during 9.9 % severely hyperglycaemic. In normal time,

Figure 19, these glycaemic states are much more difficult to identify.

Page 36: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

28

Figure 19. Example of measured

glucose in normal time.

Figure 20. Example of measured

glucose in the cumulative view.

Normoglycaemic (green and blue) and

severy hypoglycaemic (black) and

hyperglycaemic (purple) boundaries

are indicated.

The performance of the models can be expressed in different ways, for example

the difference in mean glucose concentration (El-Khatib et al., 2010). However, by

assessing only the mean value, the course of the glucose concentration is

neglected. Therefore, the assessment was based on the sum of squared errors

between the measured and modelled data.

500 1000 15000

5

10

15

20

25

Time

Measured glucose [mmol/l]

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Measured glucose [mmol/l]

Page 37: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

29

3 Results

3.1 Datasets

In Figure 21, Figure 22 and Figure 23 the averaged results for datasets KA1, KA2 en

AG1 are shown. The sum of squared errors is also presented in Table 5.

Table 5. Sum of squared errors with default and estimated parameters for all models and all meal

uptake patterns.

Z��� �� I*� Z��� �� I*� Z��� �� *%� *<�!�+� �O"Q 46.12 59.42 59.94 55.16 �O"�Q 9.639 37.03 73.30 39.99

Table 5 shows that the sum of squared errors with the default parameters is less

fluctuating over the datasets than with the estimated parameters. With the

estimated parameters the best result was found for the dataset that was used for

parameter estimation. The dataset KA2, this is the dataset of the same subject but

on another day, has a higher value but lower than with the default parameters.

The dataset AG1, this is the dataset of the second subject, yielded the worst result.

The sum of squared errors is even higher in this situation than it was with the default

parameters.

In Figure 21, it stands out that the modelled output with estimated parameters

approximates the measurements, except for the very low (severe hypoglycermia)

and the very high (severe hyperglycaemia) values. The modelled output with

default parameters estimates the glucose concentration in general too low

because less than 20 % of the measurement values are below hyperglycaemia

while the modelled glucose concentration values are below hyperglycaemia

during 65 % of time. The modelled results hits the upper boundary of 22.2 ���� ��

for more than 10 % of time while the measurement values did not reach this value.

In Figure 22 the modelled output based on the estimated parameters lies above

normoglycaemia for more than 90 % of time while this was only true for little over

50 % of time for the measurement values. For the situation with the default

parameters, this difference is only 10 %, but severe hyperglycaemia is predicted for

20 % of time, while this did not happen at all according to the measurement

values. Also with estimated values severe hyperglycaemia was predicted, but this

was the case for less than 10 % of time. On the dataset AG1 the modelled output

estimated parameter values overestimated hyperglycaemia during 40% of time.

The situation with default parameters underestimated the amount of time the

subject was hyperglycaemic by 15 %. Both with estimated and with default

parameters severe hyperglycaemia occurred during almost 20 % of time, while

severe hyperglycaemia did not occur according to the measurement values.

Page 38: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

30

Figure 21. Cumulative averaged results of all models and meal uptake kinetics on dataset

KA1, which was used for the parameter estimation.

Figure 22. Cumulative averaged results of all models and meal uptake kinetics on KA2.

Figure 23. Cumulative averaged results of all models and meal uptake kinetics on AG1.

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Dataset KA1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Dataset KA2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Dataset AG1

TOVQ R 46.12 TOV̂Q R 9.639

TOVQ R 59.42 TOV̂Q R 37.03

TOVQ R 59.94 TOV̂Q R 73.30

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

Page 39: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

31

3.2 Meal uptake patterns

Figure 24, Figure 25 and Figure 26 show the averaged cumulative results for the

meal uptake patterns spread1, spread2 and spread3. The sum of squared errors is

presented in Table 6.

Table 6. Sum of squared errors for the meal uptake patterns with the models with default, ����, and

estimated parameters, �����.

�"!���� �"!���� �"!���H *<�!�+� �O"Q 58.32 57.31 49.85 55.16 �O"�Q 34.50 38.49 46.98 39.99

The sum of squared errors realized with spread1 and spread2 is almost equal for

the modelled output with default parameters as for the modelled output with

estimated parameters. After parameter estimation the values are considerably

lower, while the difference is small for the exponential decline of spread3. The

smallest sum of squared errors was realized with spread1.

With default parameters the difference between the results of the meal uptake

patterns is small, as can be seen in Figure 24, Figure 25 and Figure 26, since in all

three figures hyperglycaemia occurred during 40 % of time, while hypoglycaemia

occurred about 10 % of time. With default parameters severe hyperglycaemia

occurred more than was the case for the situation with estimated parameters for

spread1 and spread2. However, the measurements values show severe

hyperglycaemia occurred during 0 % of time. The results with estimated

parameters show hyperglycaemia for 85 to 90 % of time for the three meal uptake

patterns, which is at least 25 % more than indicated by the measurement values.

Page 40: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

32

Figure 24. Cumulative averaged results of all models with meal pattern spread1.

Figure 25. Cumulative averaged results of all models with meal pattern spread2.

Figure 26. Cumulative averaged results of all models with meal pattern spread3.

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

con

cen

trat

ion [

mm

ol/

l] Meal uptake spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Meal uptake spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Meal uptake spread3

TOVQ R 49.85 TOV̂Q R 46.98

TOVQ R 57.31 TOV̂Q R 38.49

TOVQ R 58.32 TOV̂Q R 34.50

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

Page 41: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

33

3.3 Models

Table 7 shows the sum of squared errors for the models based on their default

parameter values for the three tested meal uptake kinetics. The results were

produced based on the three estimations of the three datasets (KA1, KA2 and

AG1). Table 8 is the same as Table 7 but with estimated parameters. The colours

indicate whether the averaged sum of squared errors had been decreased

(displayed in green) or increased (displayed in red) in relation to the values yielded

with the default parameters.

Table 7. Sum of squared errors with default parameters ����.

�"!���� �"!���� �"!���H *<�!�+� 6�!+Y�� 122.1 114.1 106.7 114.3 6�!+Y�� B �� �= 111.8 110.4 66.71 93.30 ��!�� �� B �=��� 22.56 23.53 25.52 23.87 ��!�� �� B �� �� 25.21 26.12 27.41 26.25 ��!�� �� B "=� Y� B �=��� 23.23 24.10 28.79 25.37 ��!�� �� B "=� Y� B �� �� 26.76 27.59 31.19 28.51

Table 8. Sum of squared errors with estimated parameters �����.

�"!���� �"!���� �"!���H *<�!�+� 6�!+Y�� 31.38 24.19 55.74 37.10 6�!+Y�� B �� �= 22.02 25.27 93.29 46.86 ��!�� �� B �=��� 48.37 51.82 33.36 44.52 ��!�� �� B �� �� 53.56 51.65 32.72 45.98 ��!�� �� B "=� Y� B �=��� 17.05 43.22 25.40 28.56 ��!�� �� B "=� Y� B �� �� 29.66 43.61 39.74 37.67

The results with default parameters, Table 7, shows the largest values for the

Bergman and Bergman-basal models. Large values indicate that the difference

between the measurements and the modelled data is large. The smallest value is

yielded by the Sorensen-blood model, although the differences with the other

Sorensen-types of models are small. The results with the estimated parameters,

Table 8, shows smaller differences between the Bergman type and Sorensen type

models. However, on average the two Bergman type models have lower sum of

squared errors values than for the situation with default parameters. The four

Sorensen type models yielded larger values. Still, the best value was obtained by

the Sorensen-plasma-blood model with meal uptake pattern spread1 while using

the estimated parameters. Therefore, the results of this combination is presented

with the cumulative view in Figure 27, Figure 28 and Figure 29 and with normal time

in Figure 30, Figure 31 and Figure 32. The results of all models and all meal uptake

kinetics are presented in cumulative view in Appendix D.

Page 42: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

34

Figure 27. Cumulative averaged results of Sorensen-plasma-blood, spread1 and KA1.

Figure 28. Cumulative averaged results of Sorensen-plasma-blood, spread1 and KA2.

Figure 29. Cumulative averaged results of Sorensen-plasma-blood, spread1 and AG1.

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Dataset KA1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Dataset KA2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Dataset AG1

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

on

dat

a fo

r es

tim

atio

nM

easu

red

Mod

el w

ith e

stim

ated

par

amet

ers

Mod

el w

ith d

efau

lt p

aram

eter

s

on

dat

a fo

r es

tim

atio

nM

easu

red

Mo

del

wit

h e

stim

ated

par

amet

ers

Mo

del

wit

h d

efau

lt p

aram

eter

s

Page 43: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

35

Figure 30. Dataset KA1 with Sorensen-plasma-blood and spread1 in progressive time.

Figure 31. Dataset KA2 with Sorensen-plasma-blood and spread1 in progressive time.

Figure 32. Dataset AG1 with Sorensen-plasma-blood and spread1 in progressive time.

500 1000 15000

10

20

30

40

Time [min]

Dataset KA1

500 1000 15000

10

20

30

40

Time [min]

Dataset KA2

200 400 600 800 1000 1200 14000

10

20

30

40

Time [min]

Dataset AG1

Measured gluc. conc. [mmol/l]

Model blood gluc. (est.) [m

mol/l]

Model blood gluc. (def.) [mmol/l]

Carbohydrates (est.) [*10-2 g]

Carbohydrates (def.) [*10-2 g]

Insulin input [U

]

Blood m

easurement [m

mol/l]

Measured gluc. conc. [mmol/l]

Model blood gluc. (est.) [m

mol/l]

Model blood gluc. (def.) [mmol/l]

Carbohydrates (est.) [*10-2 g]

Carbohydrates (def.) [*10-2 g]

Insulin input [U

]

Blood m

easurement [m

mol/l]

Measured gluc. conc. [mmol/l]

Model blood gluc. (est.) [m

mol/l]

Model blood gluc. (def.) [mmol/l]

Carbohydrates (est.) [*10-2 g]

Carbohydrates (def.) [*10-2 g]

Insulin input [U

]

Blood m

easurement [m

mol/l]

Page 44: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

36

The results with the cumulative view, Figure 27, Figure 28 and Figure 29, show that

the modelled output with estimated parameters yields glucose concentrations

above normoglycaemic during 100 % of time. According to the measurements this

was true for 80 % of time for dataset KA1, 60 % of time for dataset KA2 and 55 % of

time for dataset AG1. With default parameters the modelled output indicates

normoglycaemia for at least 80 % of time for all three datasets which is twice as

much as the measured values indicate for datasets KA2 and AG1. For dataset KA1

this is even four times as much. For dataset KA2 and AG1 severe hypoglycaemia

was measured but the lowest model output with estimated parameter values was

just above normoglycaemia while severe hyperglycaemia occurred or nearly

occurred according to the modelled output while it did not occur according to

the measurements.

Striking in the figures with progressive time, Figure 30, Figure 31 and Figure 32, is that

during breakfast and lunch the course of the measured and modelled data is

similar, but it is not similar for dinner. The measured glucose concentration drops

after dinner and a few hours later it starts to rise again while the modelled glucose

concentration start to rise immediately after dinner and a few hours later it drops

again which is similar to the breakfast and lunch pattern. For the dataset of AG1

the same three meal peaks resulted from the modelled glucose concentration,

while according to the measurements the first peak consists out of breakfast and

lunch together. After dinner the measured glucose concentration rises without first

dropping as was visible with the datasets KA1 and KA2. Furthermore, all three

datasets show correction boluses were administered. With dataset KA1and KA2

these were administered after dinner when also a blood measurement was

performed. With dataset AG1 this was little after 1 400 �KA. When these correction

boluses were administered, the modelled glucose concentration did not clearly

respond.

The uptake patterns in Figure 30, Figure 31 and Figure 32 show that the estimated

starting moment of the meals was shifted to a later moment and the estimated

maximum digestion rate was higher. This can also be seen in Table 9. The sensitivity

of model parameters and initial values was determined by a relative difference

(0.1 %, 1 % and 10 % except for the shift of a meal in time, V�����, which is a discrete

number (whole minutes) and therefore the variation was applied as 1, 10 and 100 �KA.

Table 9. Meal uptake pattern spread1, sensitivity and their default and estimated values on

dataset KA1 for the Sorensen-plasma-blood model.

X�!�Y���! ��� ���<��> Z�/��=� <�=�� � ��Y���� <�=�� ��=���<� ���!�� � % T��� 2.08 10 3.33 10� 4.13 10� 2.40 10� V����� 1 0 19 NAi

Page 45: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

37

The relative sensitivity and the default and estimated values of the model

parameters is presented in Table 10. The estimated initial state values, related to

measurements, are shown in

Table 11 and related to literature values in Table 12.

Table 10. Parameter sensitivity and their default and estimated values on dataset KA1 for the

Sorensen-plasma-blood model with meal uptake kinetics spread1.

X�!�Y���! ��� ���<��> Z�/��=� <�=�� � ��Y���� <�=�� ��=���<� ���!�� � % 15 1 1.51 10� 1.71 10� B10.0 10� 10 2.00 10� 4.37 10� 4.05 10� B7.29 10 14 1.76 10� 1.01 10� 2.17 10� 1.15 10� 11 1.14 10� 1.01 10� 8.43 10 B1.65 10� 9 3.72 10� 5.9 10 7.41 10 2.56 10� 37 1.38 10� 1.5 10� 2.20 10� 4.69 10� 54 7.35 10� 1.43 10 1.24 10 B1.28 10� 30 4.67 10� 1.05 10 1.11 10 5.95 10 12 4.32 10� 1.26 10� 6.31 10 B4.90 10� 57 4.24 10� 1.01 10� 1.91 10� 8.90 10� 75 3.58 10� 2.93 10 3.45 10 1.79 10� 13 3.38 10� 2.5 10 2.50 10 1.83 10� 33 3.36 10� 2.00 10� 2.00 10� 3.27 10� 25 3.21 10� 3.12 10 3.19 10 2.30 10 50 2.63 10� 5.82 10 4.85 10 B1.66 10� 76 2.50 10� 2.10 10 2.09 10 B5.36 10� 46 2.02 10� 7.04 10 8.89 10 2.64 10� 22 1.82 10� 6.30 10 6.30 10 B3.10 10� 41 1.61 10� 1.55 10� 1.55 10� B5.72 10� 55 1.60 10� 1.41 10 1.41 10 1.78 10 49 1.30 10� 5.30 10 5.35 10 8.33 10� 47 1.04 10� 6.52 10 6.49 10 B4.19 10� 56 9.72 10 6.20 10� 6.20 10� 4.87 10� 51 6.97 10 8.68 10� 8.70 10� 2.21 10� 43 6.60 10 3.50 10� 3.51 10� 2.21 10� 59 5.48 10 1.21 10 1.21 10 B3.91 10� 52 4.87 10 2.70 10 2.70 10 0 80 3.79 10 1.31 10 1.31 10 0 26 3.70 10 7.20 10� 7.20 10� 0 53 3.65 10 3.88 10� 3.03 10 6.81 10� 58 3.45 10 4.97 10� 6.92 10� 3.92 10� 60 2.99 10 1.14 10 4.61 10� B9.60 10� 69 2.83 10 1.48 10 1.42 10 B4.23 10

Page 46: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

38

78 2.66 10 9.19 10� 9.76 10� 6.26 10 48 2.58 10 3.38 10� 3.38 10� 1.64 10� 29 2.30 10 7.20 10� 7.20 10� 1.56 10� 71 2.19 10 7.10 10� 7.10 10� 9.79 10� 70 2.16 10 7.10 10� 7.10 10� 1.98 10� 38 2.07 10 7.00 10� 7.00 10� B3.28 10� 35 2.07 10 4.00 10� 4.01 10� 2.64 10� 86 1.49 10 1.70 10� 1.70 10� B2.05 10� 24 1.47 10 4.50 10� 4.50 10� 0 63 1.41 10 8.89 10� 8.89 10� 0 79 1.16 10 6.19 10� 6.19 10� 0 27 6.79 10� 9.00 10� 9.00 10� 2.44 10� 62 6.77 10� 2.14 10� 2.15 10� 2.08 10� 61 6.24 10� 1.67 10 1.67 10 2.08 10� 8 4.73 10� 6.74 10� 6.31 10� B6.35 10 32 3.97 10� 5.00 10 5.01 10 1.37 10� 66 3.49 10� 5.66 10 6.37 10 1.24 10� 87 2.61 10� 4.80 10� 4.80 10� B2.31 10� 77 2.53 10� 4.18 10 4.19 10 2.17 10� 42 2.52 10� 2.00 10� 2.65 10� 3.27 10� 83 2.14 10� 1.52 10� 1.52 10� 3.62 10� 28 2.11 10� 1.80 10� 1.80 10� 1.81 10� 84 1.97 10� 4.70 10� 4.70 10� B7.95 10� 64 1.80 10� 2.00 10 2.00 10 6.03 10� 65 1.66 10� 5.49 10� 5.49 10� 8.78 10� 40 1.14 10� 2.00 10� 1.98 10� B7.78 10� 81 1.07 10� 6.10 10� 5.89 10� B3.43 10 36 9.90 10� 3.00 10� 3.00 10� B1.16 10� 88 8.22 10� 2.90 10� 2.90 10� 6.17 10� 67 5.67 10� 5.66 10 9.05 10� 1.59 10 82 5.10 10� 1.06 10 1.15 10� 1.08 10 39 4.13 10� 1.00 10� 6.56 10 B10.0 10� 5 3.57 10� 2.51 10� 2.54 10� B1.06 10� 45 3.06 10� 6.50 10� 7.30 10� 1.23 10� 68 2.66 10� 2.44 10 1.24 10 B4.92 10� 44 1.69 10� 2.50 10� 2.54 10� 1.45 10 3 1.22 10� 1.38 10� 1.76 10� 2.74 10� 4 1.14 10� 1.12 10� 7.06 10 B3.69 10� 7 4.74 10� 1.04 10� 1.03 10� B5.79 10� 23 4.45 10� 9.93 10 9.55 10 B3.84 10

Page 47: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

39

Table 11. Estimated initial state values, related to measurements, on dataset KA1 for the Sorensen-

plasma-blood model with meal uptake kinetics spread1. The estimated values following from

measurements follow from dataset ��� / �� / ��.

����� Z�/��=� <�=�� � ��Y���� <�=�� 1 ]�O0Q 3.13 10� 2 ]�O0Q 2.58 10� 3 &('.\-(J ��\y�.( 1.61 10� / 2.38 10� / 1.39 10� 4 ]�O0Q 1.06 10� 5 ]�O0Q 2.30 10� 6 ]�O0Q 1.93 10� 7 ]�O0Q 1.61 10� 8 ]�O0Q 1.68 10� 10 ]� O0Q V�� 1.89 10� 11 ]� O0Q V�� 1.33 10� 12 ]� O0Q V�� 7.71 10� 13 ]� O0Q V�� 5.79 10�� 14 ]� O0Q V�� 9.84 10� 15 ]� O0Q V�� 1.01 10 16 ]� O0Q V�� 1.67 10� 20 &('.\-(J KA.\�KA 1.17 10� / 1.33 10� / 1.50 10� 21 ]� O0Q V��/OV�� S V��Q 4.00 10

34 3.83 10� 9.10 10� 7.59 10� B1.66 10� 6 2.63 10� 6.60 10 1.33 10� 1.01 10� 2 1.41 10� 4.50 10 5.13 10 1.39 10� 1 7.16 10� 3.50 10 3.50 10 B3.09 10� 19 3.59 10� 1.14 10 1.14 10 B1.57 10� 17 3.30 10� 9.85 10� 6.89 10� B3.00 10� 85 2.59 10� 4.60 10� 7.21 10� 5.67 10� 21 1.73 10� 7.35 10� 6.02 10� B1.81 10� 18 1.44 10� 9.45 10� 9.35 10� B1.05 10 31 1.24 10� 2.10 10 2.26 10 7.41 10 20 7.94 10� 5.05 10� 5.01 10� B7.07 10� 16 6.85 10� 2.65 10� 2.65 10� 1.64 10� 72 6.33 10� 1.10 10� 1.24 10� 1.28 10� 74 0 3.30 10� 3.30 10� 0 73 0 8.72 10� 8.72 10� 0

Page 48: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

40

Table 12. Initial state value sensitivity for values from literature and their default and estimated

values on dataset KA1 for the Sorensen-plasma-blood model with meal uptake kinetics spread1.

����� ��� ���<��> Z�/��=� <�=�� � ��Y���� <�=�� ��=. ���!�� � % 9 1 1 10 5.35 10� B4.65 10� 17 1.54 10� 1 10 7.55 10 6.54 10� 18 6.08 10 1 10� 1.13 10� 1.32 10� 19 2.16 10� 1 10 1.73 10 7.26 10�

The most sensitive model parameter is V�� which represents the vascular blood flow

rate of the periphery, see Table 10. The default flow rate is 15.1 J �KA� and the

estimated flow rate is 0.00171 J �KA�, a decrease of almost 100 %. The value of

parameter V�� also decreased by almost 100 %, from 10 �� �KA� to 0.000656 �� �KA�, which represents the red blood cell uptake rate, which is a metabolic sink.

However, the sensitivity for this parameter was relatively low (4.13 10�). The

parameters that had the largest relative difference between the default and

estimated value were V�� and V�� who received a relative increase of respectively 1 589 % and 1 082 % compared to the default values. Both parameters are

dimensionless. Parameter V�� is related to the hepatic glucose uptake which is a

metabolic sink. Parameter V�� is related to the pancreatic glucagon release. The

default values of both parameters were also determined by minimization of the

sum of squared errors between model output and measurement values by the

original author (Sorensen, 1985). After the currently executed minimization of

squared errors the parameters were estimated to different values.

Also striking in Table 10 are the zero sensitivity values of parameters V�� and V�.

These parameters are related to renal excretion of sugar. This happens only during

severe hyperglycaemia. The estimated value above which renal excretion starts is 721 �� J� L 40.4 ���� � and is given by V��. The default value of V�� is 460 �� J� L 25.8 ���� �. During estimation, the modelled BG concentration

did not come above the value of V�� resulting in a sensitivity value of zero.

From Table 11 it follows that after estimation of the initial states there are

differences in BG concentration between the body’s compartments. It should be

noted that the Sorensen type models expect their input in �� J� and not ���� �. The differences between the initial state values of the insulin

compartments were large, although their nominal estimated values were low. The

initial states related to the pancreas, see Table 12, have estimated values that

differ from the default values. According to the estimated values the insulin effect

on the hepatic glucose uptake is smaller (state 9). On the other hand, the

estimated values of the insulin effect on the glucose production is larger than with

the default values (state 17). The pancreatic glucagon release, state 19, shows a 70% increase after parameter estimation.

Page 49: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

41

4 Discussion

4.1 Time delays

The glucose concentration output of the models were tested against the

measurement values. It was assumed the measurements were correct, but as can

be seen in Figure 11 there are errors between the blood measurements and the

measurements taken by the glucose sensor. Furthermore, there is a complex

relationship between the glucose concentration in the blood and the

subcutaneous concentration (Rossetti et al., 2010) while such a relationship does

not appear to exist between the raw measurements and the produced BG

concentrations, as can be seen in Figure 11. It takes time for the subcutaneous

glucose concentration to follow the blood glucose concentration (Rossetti et al.,

2010). The tested models might not be able to incorporate this time lag. From the

physiological viewpoint the addition of an extra state might be needed, because

during this lag time cells can take up glucose adding extra dynamics to the

system. This can be a reason why in general the modelled data fits the

measurement poorly.

This time delay also works the other way around. The insulin is infused

subcutaneously and after some time it reached the bloodstream. According to

(Cobelli et al., 2011) this takes 30 to 100 �KA, but according to El-Khatib et al.,

(2009) this takes 45 �KA to 6 b. The incorporation of the dynamics that describe this

(Shichiri et al., 1998), presented in equation 34 up to and including equation 36,

did not lead to better results for the Sorensen-plasma type models when the

default parameters were used compared to the Sorensen type models, see Table

7. However, the Sorensen-plasma type models with estimated parameters yielded

better results than the Sorensen type models, Table 8. The addition of dynamics

describing the kinetics from subcutaneous to blood yields a better result and

therefore dynamics describing the kinetics from blood to subcutaneous is needed.

4.2 Black, grey and white box modelling

The difference between black and white box modelling is that black box models

simply relate the inputs to the outputs while white box models are based on

physiology (Balakrishnan et al., 2011). The four Sorensen type models are examples

of white models. The Bergman type models are based on physiology but many

physiological relations are lumped, making it a grey type of model. When

estimating the parameters the model output is fitted to the measurements.

Although the structure of the model cannot be changed in this process, the

Page 50: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

42

estimated parameter values can become of an order of magnitude that makes

them lose their physiological meaning. For some parameters of the best model,

Sorensen-plasma-blood model with meal uptake pattern spread1, this seemed to

be the case. For example, V�� which represents a bloodstream rate which almost

became zero after estimation, or V�� which represents the glucose uptake rate of

red blood cells which is also almost non-existent after estimation. The Sorensen-

plasma-blood model is a 21st order model with 88 model parameters. This gives

many degrees of freedom and therefore the estimation could render this white

model into a grey model. Table 5 shows the results resemble the results one would

expect with black box modelling: it fits the dataset used for the estimation well, in

this case KA1, but the fit on the other datasets is not as good. However, the fit on

KA2 is better than the fit on AG1. Since KA2 is the same person that was used for

the estimation this can mean that the estimated parameters are more

personalized (Parker et al., 2001). This is in line with the differences seen when

subcutaneously administering patients with an amount of insulin (Søeborg et al.,

2009). The response to this amount differs, not only between persons, but also in

time for the same person.

However, there is also another possible reason why some parameter values after

estimation seemed to have lost their physiological meaning: model identifiability.

This can be shown with a simple thought experiment, see equation 60. O' S �Q 10 R 5 (60)

In equation 60, ' and � can take any value as long as their sum equals to 0.5. This

means the sum of ' and � gives a correct value, but the exact individual values of ' and � cannot be found. This is the case when a model is unidentifiable. A way to

find out if a model is identifiable is by determination of the rank of the Jacobian

(Lewandowski, 2010). During the research this was done for the Sorensen-blood

model. The rank of the Jacobian of this model was equal to the number of

parameters, meaning it is identifiable. It was assumed this was also the case for the

Sorensen-plasma models. However, it appeared the rank is not full and therefore

the Sorensen-plasma models were found unidentifiable, resulting in estimated

parameter values that are not necessarily physiologically sound.

4.3 Meal uptake patterns

The results of none of the models combined with any of the meal uptake patterns

gave a good fit with the measurements. This can be the result of shortcomings of

the models but also of the meal uptake patterns. However, the averaged fit with

the smallest sum of squared errors was yielded with spread1, see Table 6. The worst

fit was yielded by spread3. A continuous digestion rate appears to describe the

uptake of carbohydrates best. However, it can be seen for KA that the pattern of

Page 51: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

43

the BG concentration is similar for breakfast and for lunch. The BG concentration

rises to a maximum value and decreases again. For dinner the concentration

decreases first and increases after some time. For breakfast and lunch the main

food is bread. So, if bread consists out of a type of carbohydrates that can easily

and immediately be digested after it enters the intestines, this result is expected.

When dinner mainly consists out of carbohydrates that are oligo- and

polysaccharides, the uptake is slower because these sugars first have to be broken

down to monosaccharides (Caspary, 1992). When starting a meal the subjects

merely enter the amount of carbohydrates into their insulin pump, without

indicating the type of carbohydrate. According to the measured glucose

concentrations in Figure 30, Figure 31 and Figure 32, administering a bolus before

the meal is correct for meals based on bread (breakfast and lunch), but before

dinner this can lead to hypoglycaemia. All the models react immediately on

carbohydrates and therefore the patterns are similar for breakfast, lunch and

dinner in the figures. As Bequette (2005) said, better meal models are needed.

Fabietti et al. (2006) presented a meal model based on sugar, fast absorption

starch and slow absorption starch. Based on the results presented in Figure 30,

Figure 31 and Figure 32 such a model that differentiates between the types of

carbohydrates could give better results.

4.4 Missing dynamics

Both the Bergman type and the Sorensen type models had insulin and

carbohydrate inputs. The modelled results do not fit the measurements well, see all

tables and figures in the Results chapter. This means essential dynamics could be

missing. In literature factors as stress, illness and pregnancy were found to influence

the glucose concentration (Balakrishnan et al., 2011). But also hormones as

epinephrine (adrenaline) and glucagon play a role. Accept for glucagon in the

Sorensen type models, none of these are incorporated into the models. Glucagon

is a special hormone, it is basically the counterpart of insulin since it causes the liver

to release sugar to increase the blood glucose concentration (Farmer Jr. et al.,

2008). The Bergman type models take the liver into account, but only as a

parameter and not as a state. This means the liver can take up and release

theoretically an infinite amount of sugar. The Sorensen type models have multiple

states that relate to the liver, see Table 12. The estimated initial values differ

between 13.2 % and 654 %. If these initial values are not fully correct, they can

have implications on the long run. The amount of glucagon is regulated by the

body and is not measured by the insulin pump. This can also have undesirable

effects on the modelled results. The effectiveness of infused insulin depends on the

amount of glucagon that is present in the body (Farmer Jr. et al., 2008). Because

Page 52: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

44

the amount of glucagon is unknown the effectiveness of the insulin is unknown. The

further into the future the more this will negatively influence the accuracy of the

modelled output.

The compartments of the Sorensen type models are connected by blood flow

rates. These flow rates are parameters. This means their value does not change.

However, it can be argued that these rates change, for example as a result of

physical exercise or hormones that increase or decrease the diameter of the

blood vessels (Farmer Jr. et al., 2008). For the Bergman type model, additions have

been made to incorporate physical exercise (Roy and Parker, 2007).

4.5 Differences between the models

The results of the Bergman type models in relation to the Sorensen type models are

worse before parameter estimation, see Table 7 and Table 8. After estimation the

results approximate the results of the Sorensen type models. Bergman-basal with

meal uptake pattern spread1 has the smallest sum of squared errors of the

Bergman type models. However, when averaging the meal uptake patterns the

Bergman-basal model does not perform better than the Bergman model.

Therefore, the basal insulin parameter is indeed a parameter since it has a value

that does not change with time. For the Bergman-basal model, this parameter was

linked to the basal insulin level that was actually administered to the subject.

With the default values there are no large differences between the results of the

four Sorensen type models. After the parameter estimation the Sorensen-plasma

type models yielded smaller sums of squared errors than the Sorensen type models.

The two added insulin infusion states make the Sorensen-plasma type models more

accurate. The model output values related to the blood fit the subcutaneously

measured values better than the values related to the tissue.

The sums of squared errors lies close together for all models. Therefore, both the

Bergman models as the Sorensen models are missing dynamics.

4.6 Predicting future glucose concentrations

The Bergman and Sorensen type models only have the hormone insulin as input. El-

Khatib et al. (2010) try to build an artificial pancreas that infuses not only insulin, but

also glucagon. If the model describes the future blood glucose concentration

accurately, the administration of glucagon is superfluous. But when the model

does not predict the future glucose concentration accurately, countermeasures

can be taken in both directions. These countermeasures have to be taken in time

because the lag time is large (Cobelli et al., 2011). These large time delays are the

Page 53: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

45

reason PID control of blood glucose has not been a success (Teixeira and Malin,

2008).

In the current research the best result was yielded with the Sorensen-plasma-blood

model with meal uptake pattern spread1. However in Figure 27 up to and

including Figure 32 it can be seen that the model output does not fit the measured

data very well. Performance is especially poor for detecting severe hypo- and

hyperglycaemia. The model can therefore not be used to predict future blood

glucose concentrations accurately.

The use of a Kalman filter, a way to use both measured and modelled values, is not

feasible. This is because the insulin is given at the start of the meal, after that only

extra insulin can be administered. If too much insulin was administered, there is no

possibility to correct for this. Therefore, the model must fully predict the future

blood glucose concentration because once the insulin is administered, no

corrections can be made anymore when measured values suggest this.

Page 54: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

46

Page 55: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

47

5 Conclusions

During this research two versions of the Bergman model (Bergman et al., 1979) and

four versions of the Sorensen model (Sorensen, 1985) were examined together with

three meal uptake patterns, a trapezoidal pattern, a rectangular shaped pattern

and a pattern that exhibited an exponential decline in the digestion rate.

Examination was done on three datasets, two of which were from the same person

but obtained at different days while the third dataset was of a different person.

The sensitivity to parameters of the models, to parameters of the meal uptake

patterns and to initial state values were determined and their values were

estimated based on one dataset. The model parameters were estimated based

on data of 900 �KA, starting at the end of the night and ending just before dinner.

The meal uptake parameters and initial state values were determined on data of

a full day. The modelled blood glucose concentration which is measured as well

as computed by the models, was compared. The glucose values were

subcutaneously measured by the continuous subcutaneous glucose sensor Enline

Sensor of the subcutaneous insulin infusion pump Medtronic MiniMed Paradigm®

Veo 554. The difference between the model output and measurements was

measured by the sum of squared errors. This was done per dataset, per meal

uptake pattern and per model.

The results showed, see Table 5, that the models found in literature do not

accurately describe the subcutaneously measured glucose concentration since

the averaged sum of squared errors ranged from 46.12 to 59.94. After parameter

estimation this value improved to 9.639 for the dataset used for the parameter

estimation. On the dataset of the same subject, but a different day this value

increased to 37.03 which is lower than the values without parameter estimation. On

the dataset of a different person the largest value, 73.30, was found. This indicated

that the model with estimated parameters became more accurate than with the

default parameters, not only on the data used for estimation but also on different

data of the same person. The estimated parameter values were personalized

leading to a higher averaged sum of squared errors on data of a different subject

than was the case with the default parameters.

The Bergman and Sorensen models do not incorporate meal uptake dynamics

and therefore three meal uptake patterns were examined. The first, spread1, is

based on Lehmann and Deutsch (1992) that gives a trapezoidal digestion rate, see

Figure 15. The second, spread 2, is based on Camilleri et al. (1989) and assumes

that digestion takes 300 �KA. The digestion rate is therefore determined by the

amount of digested carbohydrates, see Figure 16. The third, spread3, is based on

Fisher according to Farmer Jr. et al. (2009) and assumes an exponential decline in

Page 56: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

48

the uptake rate, see Figure 17. The smallest sum of squared errors before

parameter estimation was yielded with spread3, but parameter estimation did not

improve the result. The smallest averaged sum of squared errors after parameter

estimation was obtained for spread1, see Table 6. However, as can be seen in

Figure 30 and Figure 31 the pattern of breakfast and lunch is different than the

pattern of dinner. This can be the result of different type of carbohydrates with

different digestion times (Caspary, 1992). None of the meal uptake patterns take

this into account. This pattern is less visible in Figure 32. This subject gives multiple

smaller shots of insulin for an amount of time after starting the meal. This results in a

different pattern than when one large bolus of insulin is given at the start of each

meal.

The combination that yielded the smallest averaged sum of squared errors of 17.05

while averaging over all three datasets was with the Sorensen-plasma-blood

model and meal uptake pattern spread1. The results in normal time, Figure 30,

Figure 31 and Figure 32 show large discrepancies between the modelled glucose

concentration and the measured glucose concentration. For example in Figure 31,

some hours after dinner the model output predicts with a value of 22 ���� �

almost severe hyperglycaemia while the measurements indicate the subject

suffered from severe hypoglycaemia at that moment with a value below 3.3 ���� �. This is also visible in the cumulative averaged results, Figure 27, Figure 28 and

Figure 29. Especially the last two figures show the largest errors for very low and

very high glucose concentration values. This means the models perform worst with

values that are most critical: values that indicate severe hypo- and severe

hyperglycaemia.

When creating an algorithm for an artificial pancreas the accuracy of the model

must be high since it is used to estimate future blood glucose concentration

values. So, when this estimation is done at the start of a meal the insulin is

administered. If the model does not accurately estimate the future course of the

glucose concentration (severe) hypo- or hyperglycaemia can occur which can

become life threatening. In the case of hypoglycaemia, which is also the most

acute of the two, no counteractions can be taken. Therefore, none of the models

was found to produce blood glucose concentration values that accurately

enough describe the measured glucose concentration values.

The models did not accurately describe the subcutaneously measured blood

glucose concentrations. The parameter estimation improved the result, but not to

a satisfactory level since instances were observed where hyperglycaemia was

modelled while the subject was experiencing severe hypoglycaemia. The uptake

of a meal based on bread is best described by spread1, but dinner is not

accurately described. And therefore, none of the models is suitable to use for

designing a controller for an artificial pancreas.

Page 57: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

49

6 Recommendations

The measurements showed different reaction patterns of the blood glucose

concentration after dinner than after breakfast and lunch. It was discussed that

not only the amount of carbohydrates is important, but also the type. Some

carbohydrates have to be cut into other molecules before they can be taken up

by the human body (Caspary, 1992). The three used meal uptake patterns

comprise only the amount of carbohydrates, not the type. Fabietti et al. (2006)

presented a meal model that takes sugar, fast absorption starch and slow

absorption starch into account. It is recommend to examine this type of meal

model.

The smallest sum of squared errors was obtained by using the Sorensen-plasma-

blood model. This model used the dynamics presented by Shichiri et al. (1998) that

describes the course from subcutaneous insulin injection until entering the plasma.

However, adding these dynamics to the Sorensen model made it unidentifiable. It

is recommended that the cause of this is to be found and to estimate the

parameters again. When the model is identifiable, the parameters will get unique

values. These estimated parameter values can then be examined to see whether

they fit the range of values that are physiologically sound. When values are found

that are physiologically challenging, the cause lies in the quality of the model and

it is recommended to identify missing dynamics, for example the effect of

epinephrine (Farmer Jr. et al., 2008).

In a healthy person the human body has two control inputs to regulate the blood

glucose concentration: insulin and glucagon. T1DM patients still produce

glucagon. Therefore, it is recommended to research the effect of glucagon,

especially the effect of an amount of glucagon relative to a different amount of

insulin (Farmer Jr. et al., 2008).

The research showed that the accuracy of the models is not good enough to

predict future blood glucose concentrations. The accuracy of the model must be

high when only insulin is administered, because over-administration can lead to

severe hypoglycaemia while there is no possibility to counteract this effect. When

glucagon is added, counter measurements can be taken. This means the

accuracy of the model may be lower because the importance of the precision of

the prediction is lower. PID-control was researched but was found inadequate due

to the time lags (Cobelli et al., 2011). Therefore, it is recommended to examine the

possibilities to extend the models with glucagon infusion. The model can be used

to predict future blood glucose concentrations, while Kalman filtering can be used

to counteract the shortcomings of the model.

Page 58: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

50

Page 59: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

51

References

Andersen, K. E., and M. Højbjerre. 2003. A Bayesian approach to Bergman’s

minimal model. Proceedings of the Ninth International Workshop on Artificial

Intelligence and Statistics. 236-243.

Balakrishnan, N.P., G.P. Rangaiah and L. Samavedham. 2011. Review and analysis

of blood glucose (BG) models for type 1 diabetic patients. Industrial & Engineering

Chemistry Research. 50(21):12041-12066.

Berger, M. and D. Rodbard. 1986. Computer simulation of plasma insulin and

glucose dynamics after subcutaneous insulin injection. Diabetes Care. 12(10):725-

736.

Bequette, B.W. 2005. A critical assessment of algorithms and challenges in the

development of a closed-loop artificial pancreas. Diabetes Technology and

Therapeutics. 7(1):28-47.

Bergman, R.N., D.T. Finegood and M. Ader. 1985. Assessment of insulin sensitivity in

vivo. Endocrine Reviews. 6(1):45-86.

Bergman, R.N., Y.Z. Ider, C.R. Bowden and C. Cobelli. 1979. Quantitative estimation

of insulin sensitivity. American Journal of Physiology-Endocrinology and

Metabolism. 236(6):E667.

Boulton, A. J., A.I. Vinik, J.C. Arezzo, V. Bril, E.L. Feldman, R. Freeman, R.A. Malik, R.E.

Maser, J.M. Sosenko and D. Ziegler. 2005. Diabetic neuropathies a statement by

the American Diabetes Association. Diabetes care. 28(4):956-962.

Breton, M., A. Farret, D. Bruttomesso, S. Anderson, L. Magni, S. Patek, C. Dalla Man,

J. Place, S. Demartini, S. Del Favero, C. Toffanin, C. Hughes-Karvetski, E. Dassau, H.

Zisser, F.J. Doyle III, G. De Nicolao, A. Avogaro, C. Cobelli, E. Renard and B.

Kovatchev. Fully integrated artificial pancreas in type 1 diabetes. 2012. Diabetes.

61(9):2230-2237.

Camilleri, M., L.J. Colemont, S.F. Phillips, M.L. Brown, G.M. Thomforde, N. Chapman

and A.R. Zinmeister. 1989. Human gastric emptying and colonic filling of solids

characterized by a new method. American Journal of Physiology-Gastrointestinal

and Liver Physiology. 257(2):G284-G290.

Page 60: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

52

Carlsson, Å., G. Sundkvist, L. Groop and T. Tuomi. 2000. Insulin and glucagon

secretion in patients with slowly progressing autoimmune diabetes (LADA). The

Journal of Clinical Endocrinology & Metabolism. 85(1):76-80.

Caspary, W.F. 1992. Physiology and pathophysiology of intestinal absorption. The

American journal of clinical nutrition. 55(1):299S-308S.

Chelouah, R. and P Siarry. 2005. A hybrid method combining continuous tabu

search and Nelder-Mead simplex algorithms for the global optimization of

multiminima functions. European Journal of Operational Research. 161(3):636-654.

Cobelli, C., E. Renard and B. Kovatchev. 2011. Artificial pancreas: past, present,

future. Diabetes. 60(11):2672-2682.

Dalla Man, A. Avogaro, D. Bruttomesso, A. Filippi, R. Scotton, L. Magni, G. Lanzola,

F. Di Palma, P. Soru, C. Toffanin, G. De Nicolao, S. Arnolds, C. Benesch and L.

Heinemann. 2013. Day and night closed-loop control in adults with type 1

diabetes. Diabetes Care. 36(12):3882-3887.

Dassau, E., H. Zisser, R.A. Harvey, M.W. Percival, B. Grosman, W. Bevier, E. Atlas, S.

Miller, R. Nimri, L. Jovanovič and F.J. Doyle. 2013. Clinical evaluation of a

personalized artificial pancreas. Diabetes care. 36(4):801-809.

Downing, D.J., R.H. Gardner and F.O. Hoffman. 1985. An examination of response-

surface methodologies for uncertainty analysis in assessment models.

Technometrics. 27(2):151-163.

El-Khatib, F.H., J. Jiang and E.R. Damiano. 2009. A Feasibility study of bihormonal

closed-loop blood glucose control using dual subcutaneous infusion of insulin and

glucagon in ambulatory diabetic swine. Journal of Diabetes Science &

Technology. 3(4):789-803.

El-Khatib, F.H., S.J. Russell, D.M. Nathan, R.G. Sutherlin and E.R. Damiano. 2010. A

biohormonal closed-loop artificial pancreas for type 1 diabetes. Science

Translational Medicine. 2(27):1-12.

Eurodiab, EURODIAB ACE Study Group. 2000. Variation and trends in incidence of

childhood diabetes in Europe. The Lancet. 355:873-876.

Page 61: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

53

Fabietti, P.G., V. Canonico, M.O. Federici, M.M. Benedetti and E. Sarti. 2006.

Control oriented model of insulin and glucose dynamics in type 1 diabetes.

Medical and Biological Engineering and Computing. 44:69-78.

Farmer Jr., T.G., T.F. Edgar and N.A. Peppas. 2008. The future of open- and closed-

loop insulin delivery systems. Journal of Pharmacy and Pharmacology. 60(1):1-13.

Farmer Jr., T.G., T.F. Edgar and N.A. Peppas. 2009. Effectiveness of intravenous

infusion algorithms for glucose control in diabetic patients using different simulation

models. Industrial & engineering chemistry research. 48(9):4402-4414.

Finan D.A., C.C. Palerm, F.J. Doyle III, H. Zisser, L. Jovanovič, W.C. Bevier and D.E.

Seborg. 2008. Identification of empirical dynamic models from type 1 diabetes

subject data. Proceedings of the American Control Conference. Seattle,

Washington, USA. 2099-2104.

Guyton, J.R., R.O. Foster, J.S. Soeldner, M.H. Tan, C.B. Kahn, L. Koncz and R.E.

Gleason. 1978. A model of glucose-insulin homeostasis in man that incorporates

the heterogeneous fast pool theory of pancreatic insulin release. Diabetes.

27(10):1027-1042.

Hamby, D.M. 1994. A review of techniques for parameter sensitivity analysis of

environmental models. Environmental monitoring and assessment. 32(2):135-154.

Hörnquist, J.O., A. Wikby, P.O. Andersson and A.M. Dufva. 1990. Insulin-pen

treatment, quality of life and metabolic control: retrospective intra-group

evaluations. Diabetes research and clinical practice. 10(3):221-230.

Hovorka, R., J.M. Allen, D. Elleri, L.J. Chassin, J. Harris, D. Xing, C. Kollman, T.

Hovorka, A.M.F. Larsen, M. Nodale, A. De Palma, M.E. Wilinska, C.L. Acerini and

D.B. Dunger. 2010. Manual closed-loop insulin delivery in children and adolescents

with type 1 diabetes: a phase 2 randomised crossover trial. The Lancet. 375:743-

751.

Kadish, A.H. 1963. Automation control of blood sugar a servomechanism for

glucose monitoring and control. ASAIO Journal. 9(1):363-367.

Katsoyannis, P.G., A.C. Trakatellis, C. Zalut, S. Johnson, A. Tometsko, G. Schwartz

and J. Ginos. 1967. Studies on the synthesis of insulin from natural and synthetic A

and B Chains. III. Synthetic insulins. Biochemistry. 6(9):2656-2668.

Page 62: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

54

Kostic, A.D., D. Gevers, H. Siljander, T. Vatanen, T Hyötyläinen, A. Hämäläinen, A.

Peet, V. Tillmann, P. Pöhö, I. Mattila, H. Lähdesmäki, E.A. Franzosa, O. Vaarala, M.

De Goffau, H. Harmsen, J. Ilonen, S.M. Virtanen, C.B. Clish, M. Orešič, C.

Huttenhower, M. Knip and R.J. Xavier. 2015. The dynamics of the human infant gut

microbiome in development and progression toward type 1 diabetes. Cell Host &

Microbe. 17:260-273.

Kovács, L. and B. Kulcsár. 2007. LPV Modeling of type 1 diabetes mellitus.

Proceedings of the 8th International Symposium of Hungarian Researchers on

Computational Intelligence and Informatics. Budapest, Hungary. 163-173.

Lehmann, E.D. and T. Deutsch. 1992. A physiological model of glucose-insulin

interaction in type 1 diabetes mellitus. Journal of biomedical engineering.

14(3):235-242.

Lewandowski, S. and S. Farrell. 2011. Computational modelling in cognition:

Principles and practice. Sage. Thousand Oaks, California, USA.

Luijf, Y.M., J.H. DeVries, K. Zwinderman, L. Leelarathna, M. Nodale, K. Caldwell, K.

Kumareswaran, D. Elleri, J.M. Allen, M.E. Wilinska, M.L. Evans, R. Hovorka, W. Doll, M.

Ellmerer, J.K. Mader, E. Renard, J. Place, A. Farret, C. Cobelli, S. Del Favero, C.

Magni, L., D.M. Raimondo, L. Bossi, C. Dalla Man, G. De Nicolao, B. Kovatchev and

C. Cobelli. 2007. Model predictive control of type 1 diabetes: an in silico trial.

Journal of Diabetes Science & Technology. 1(6):804-812.

Nadler, S.B., J.U. Hidalgo and T. Bloch. 1962. Prediction of blood volume in normal

human adults. Surgery. 51(2):224-232.

Nelder, J.A. and R. Mead. 1965. A simplex method for function minimization. The

computer journal. 7(4):308-313.

Parker R.S., F.J. Doyle III and N.A. Peppas. 2001. The intravenous route to blood

glucose control. IEEE Engineering in Medicine and Biology Magazine. 20(1):65-73.

Parker R.S., F.J. Doyle III, J.H. Ward and N.A. Peppas. 2000. Robust �� glucose

control in diabetes using a physiological model. AIChE Journal. 46(12):2537-2549.

Page 63: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

55

Patterson, C.C., G.G. Dahlquist, E. Gyürüs, A. Green, G. Soltész and the EURODIAB

Study Group. 2009. Incidence trends for childhood type 1 diabetes in Europe

during 1989–2003 and predicted new cases 2005–20: a multicentre prospective

registration study. The Lancet. 373:2027-2033.

Percival, M.W., Y. Wang, B. Grosman, E. Dassau, H. Zisser, L. Jovanovič and F.J.

Doyle III. 2011. Development of a multi-parametric model predictive control

algorithm for insulin delivery in type 1 diabetes mellitus using clinical parameters.

Journal of process control. 21(3):391–404.

Renard, E., J. Place, M. Cantwell, H. Chevassus and C.C. Palerm. 2010. Closed-loop

insulin delivery using a subcutaneous glucose sensor and intraperitoneal insulin

delivery. Diabetes Care. 33(1):121-127.

Rossetti, P., J. Bondia, J Vehí and C.G. Fanelli. 2010. Estimating plasma glucose

from interstitial glucose: the issue of calibration algorithms in commercial

continuous glucose monitoring devices. Sensors. 10(12):10936-10952.

Roy, A. and R.S. Parker. 2007. Dynamic modeling of exercise effects on plasma

glucose and insulin levels. Journal of Diabetes Science and Technology. 1(3):338-

347.

Shapiro, A.M.J., J.R.T. Lakey, E.A. Ryan, G.S. Korbutt, E. Toth, G.L. Warnock, N.M.

Kneteman and R.V. Rajotte. 2000. Islet transplantation in seven patients with type 1

diabetes mellitus using a glucocorticoid-free immunosuppressive regimen. New

England Journal of Medicine. 343(4):230-238.

Shichiri, M., M. Sakakida, K. Nishida and S. Shimoda. 1998. Enhanced, simplified

glucose sensors: long-term clinical application or wearable artificial endocrine

pancreas. Artificial Organs. 22(1):32-42.

Shields, B.M., S. Hicks, M.H. Shepherd, K. Colclough, A.T. Hattersley and S. Ellard.

2010. Maturity-onset diabetes of the young (MODY): how many cases are we

missing? Diabetologia. 53:2504-2508.

Skyler, J.S., W.T. Cefalu, I.A. Kourides, W.H. Landschulz, C.C. Balagtas, S.L. Cheng

and R.A. Gelfand. 2001. Efficacy of inhaled human insulin in type 1 diabetes

mellitus: a randomised proof-of-concept study. The Lancet. 537:331-335.

Page 64: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

56

Søeborg, T., C.H. Rasmussen and E. Mosekilde. 2009. Absorption kinetics of insulin

after subcutaneous administration. European journal of pharmaceutical sciences.

36(1):78-90.

Sorensen, J.T. 1985. A physiologic model of glucose metabolism in man and its use

to design and assess improved insulin therapies for diabetes. PhD Thesis.

Massachusetts Institute of Technology.

Srinivasan, R., A.H. Kadish and R. Sridhar. 1970. A mathematical model for the

control mechanism of free fatty acid-glucose metabolism in normal humans.

Computers and Biomedical Research. 3(2):146-165.

Steil, G.M., B. Clark, S. Kanderian and K. Rebrin. 2005. Modeling insulin action for

development of a closed-loop artificial pancreas. Diabetes technology &

therapeutics. 7(1):94-108.

Teixeira, R.E. and S. Malin. 2008. The next generation of artificial pancreas control

algorithms. Journal of Diabetes Science and Technology. 2(1):105-112.

Van Herpe, T., M. Espinoza, B. Pluymers, I. Goethals, P. Wouters, G. Van Den Berghe

and B. De Moor. 2006. An adaptive input-output modeling approach for

predicting the glycemia of critically ill patients. Physiological Measurement.

27(11):1057-1069.

Voltarelli, J.C., C.E.B. Couri, A.B.P.L. Stracieri, M.C. Oliveira, D.A. Moraes, F. Pieroni,

M. Coutinho, K.C.R. Malmegrim, M.C. Foss-Freitas, B.P. Simões, M.C. Foss, E. Squiers

and R.K. Burt. 2007. Autologous nonmyeloablative hematopoietic stem cell

transplantation in newly diagnosed type 1 diabetes mellitus. The Journal of the

American Medical Association. 297(14):1568-1576.

WHO, World Health Organization. 2010. WHO International Standard Insulin.

http://www.nibsc.org/documents/ifu/83-500.pdf (22-2-2015)

WHO, World Health Organization. 2015. Diabetes fact sheet N.312.

http://www.who.int/mediacentre/factsheets/fs312/en/ (20-2-2015)

Wilinska M.E., L.J. Chassin, C.L. Acerini, J.M. Allen, D.B. Dunger and R. Hovorka.

2010. Simulation environment to evaluate closed-loop insulin delivery systems in

type 1 diabetes. Journal of Diabetes Science and Technology. 4(1):132-144.

Page 65: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

57

Appendices

Appendix A: Flow diagram of the Sorensen model

The glucose subsystem The Insulin subsystem The Glucagon subsystem

Source: Farmer Jr. et al., 2009

Page 66: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

58

Page 67: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

59

Appendix B: The Sorensen T1DM model

Variables are explained in Appendix C.

The glucose subsystem: ������ � ���

� � ���� � ��

� � ���� � ��

�� � ���� � �

������ � ���

� � ���� � 1��

� ����

������ � ���

� � � � ��� � � � ��

� � � � ��� � � � ��

� � � � ���� � 1��

����� � ���

� � ��� �

� � �� �� � �

������ � ���

� � � � �� � � ��

� � �� � 1�� � ����

� � �����

������ � ���

� � ���� � ��

� � ����

������ � ���

� � ���� � ��

� � ���� � ��

�� � ����

� � ��

������ � ���

� � ���� � 1��

� � �����

Where: �� � 70 ��/��� ��� � 10 ��/��� � � 20 ��/��� ��� � �r���

� � � ������ � � ����� � �����

� � ����� [r���

� � � 155 ��

���

������ � � 1.425 � 1.406 � tanh%0.6199 � ����

�� � 0.4969�' ��� ���

�� � ���

���

������

��� �

����� ������

�� � � ������ �

���

(� � 25 ��� �����

�� � � 1.2088 � 1.138 � tanh%1.669 � ��+��� � 0.8885�' ���

�+��� � ��

!�.#$

������ � � �����

�� � � ����� ��� �����

�� � � 2.7 � tanh�0.388 � ,� ���

������

��� �

��� -%&���

'(�

!� �����. �

���

() � 65 ��� ��� � �/���

� � � ����� � ������ � �����

�/���� � � 20 ��

���

������

��� �

*�� ������

�� � � ������ �

���

Page 68: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

60

������� � � 2.0 � tanh�0.549 � �+�

��� ��� �+�

�� � ���

!�.#$

������ � � 5.6648 � 5.6589 � tanh%2.4375 � ���

� � 1.48�' ��� ���

�� � ���

���

�� � 071 � 71 � tanh%0.011 � ���� � 460�' 12/ ��

� 3 460 ���40.872 � ��� � 330 12/ ��

� 5 460 ���4 6 ��� � �/���

� � � ����� � � �����

� � ����� �/���

� � � 35 ��

���

����� � � ��

+,.+�

������ � � 7.035 � 6.51623 � tanh%0.33827 � ��+��

� � � 5.82113�' ��� �+��

� � � ��

-.$�#

The insulin subsystem: �+���� � �+�

� � 7� � +� � 7 � +�

� � 7�� � 18�� � �� � ��8�

�+���� � �+�

� � +��� � 1��

� � �� � ��8��

�+���� � �+�

� � +��� � 7�8�

�+���� � �+�

� � 7� � +�� � 7� � +�

� � 7� � +�� � 7� � +�

� � 7� � �.�� � 18��

�+��� � �+�

� � +�� � 78

�+���� � �+�

� � +��� � 7�8�

� � ��8��

�+���� � �+�

� � +��� � 7�8�

� � �+�� � +�

�� � 8����

� � 8��

Where: �� � 0 ��

��� (pancreas does not produce insulin)

�� � 9�� � �+�� � 7� � +

� � 7 � ��� �:��� 9�� � 0.40 ��� �� � 9�� � +�

� � 7� �:��� 9�� � 0.30 ��� �� � +�

�1 � 9��9��� 17�

� ���8��

�:��� 9�� � 0.15 ;– <

Page 69: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

61

Glucagon subsystem: �,�� � ��� � ,� � 9���8� 1���

�� � ����� � � ����

� � ��� ����

� � � 1.3102 � 0.61016 � tanh%1.0571 � ��+��� � 0.46981�' ;– <

�+��� � ��

�-.�-

����� � � 2.9285 � 2.095 � tanh%4.18 � ����

�� � 0.6191�' ;– < ���

�� � ���

/�.+/

Page 70: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

62

Page 71: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

63

Appendix C: Transforming Sorensen model to state-space

For the notation of variables, the values and descriptions Parker et al. (2000) was

primarily used. In cases of errors or ambiguities the ones presented by Sorensen

(1985) was used, indicated with (1). If an error or ambiguity still existed the ones

presented by Kovács and Kulcsár (2007) was used, indicated with (2).

Explanation of the model variables. For �=>?, @ stands for state, A stands for parameter and + stands for input. If during transformation to state space a variable

is lumped it is indicated as B. CDEF GHIJHKLF MFNOIJEPJQR SRJP @ � �TU�4�V/= ?TV��2� W�V�? ��� @ � �4TX2W? X2�X?��/V��2� ��� � �B(�� @ + +�WT4�� X2�X?��/V��2� ��: � B(�� @ , �4TXV�2� X2�X?��/V��2� ��� A 7 8VWXT4V/ >4VW�V 142Y /V�? �B � ���(�� A 8VWXT4V/ Z422� 142Y /V�? ��B � ���(�� A � �/V�WXV>�44V/= ��11TW�2� ���? X2�W�V�� ����� A 8 824T�? �B� A 824T�? ��B� + � A à �?�VZ24�X W2T/X? 21 W��[ ��� � ���(�� or ��: ����(�� (1) B � �T4��>4�?/ 21 ZVWV4 �?�VZ24�X /V�? ��� (1) A 9 �?�VZ24�X W2T/X? 21 W��[ �B � ���(�� or ��� (1) A / �?�VZ24�X W2T/X? 21 W��[ ��� � ���(�� (1) A ( ���? X2�W�V�� �����

Explanation of the sub- and superscripts. GHIJHKLF MFNOIJEPJQR � \?>V��X V/�?/= ] ]/V�� ]: ]/V�� T>�V[? ^ ^V>�44V/= W>VX? � �4TX2W? \ \?V/� V�� 4T��W \�A \?>V��X �4TX2W? >/2�TX��2� \�: \?>V��X �4TX2W? T>�V[? + +�WT4�� +\�A +�WT4�� ?11?X� 2� \�A +\�: +�WT4�� ?11?X� 2� \�:

Page 72: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

64

Transformation of states and inputs to state space. CDEF _HI`FI FP HL. aPHPF NEHOF SRJP @�V�? ��� U� ��� � �4(�� @�V�? ��� U! ��� � �4(�� @�V�? ��� U$ ��� � �4(�� @�V�? ��� U# ��� � �4(�� @�V�? ��� U- ��� � �4(�� @�V�? ��� U, ��� � �4(�� @�V�? ��� U0 ��� � �4(�� @�V�? �� U+ ��� � �4(�� @�V�? ����� U/ ��� @�V�? +�� U�� ��: � 4(�� @�V�? +�� U�� ��: � 4(�� @�V�? +�� U�! ��: � 4(�� @�V�? +�� U�$ ��: � 4(��

GHIJHKLF MFNOIJEPJQR +8+ +��/V?�2TW ��WT4�� ��1TW�2� b b���?= b^ b���?= X4?V/V�X? bc b���?= ?UX/?V��2� B B�?/ B^ B�?/ X4?V/V�X? , �4TXV�2� ,\�A �4TXV�2� ?11?X� 2� \�A A A?/�>d?/= ��TWX4?/V��>2W? ��WWT?� A^ A?/�>d?/V4 X4?V/V�X? A�: A?/�>d?/V4 �4TX2W? T>�V[? A+e AV�X/?V��X ��WT4�� /?4?VW? A,^ AV�X/?V��X �4TXV�2� X4?V/V�X? A,e ,2/�V4�f?� >V�X/?V��X �4TXV�2� /?4?VW? e]^: e?� Z422� X?44 T>�V[? @ �T� �W�2�VXd/���?W���?� @+� +�WT4�� VZW2/>��2� ���2 Z422� W�/?V� 12/� WTZXT�V�?2TW �?>2� @: �T� T>�V[? � ��WWT? T>�V[?

(1) ∞ ,2/�V4�f?� VW=�>�2��X W�?V�= W�V�? V4T? (1) Γ �4TXV�2� (1) 0 +����V4 V4T? (1) AΓe AV�X/?V��X �4TXV�2� /?4?VW?

Page 73: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

65

CDEF _HI`FI FP HL. aPHPF NEHOF SRJP @�V�? +�� U�# ��: � 4(�� @�V�? +�� U�- ��: � 4(�� @�V�? +� U�, ��: � 4(�� @�V�? ����� U�0 ��� @�V�? ����� U�+ ��� @�V�? , U�/ ��� +�>T� �.� T� ��: � min(�� +�>T� �� T! ��: � min(�� +�>T� �� T$ ��: � min(�� +�>T� �� � �� ��� � ���(��

Transformation of parameters to state space. Nominal values were determined by

minimizing the sum of squared errors by Sorensen (1985) and were therefore not

identified with a variable name. CDEF _HI`FI FP HL. aPHPF NEHOF GHLjF SRJP AV/V�?�?/ �� >� 3.5 ��4 � ���(�� AV/V�?�?/ �� >! 4.5 ��4 � ���(�� AV/V�?�?/ �� >$ 13.8 ��4 � ���(�� AV/V�?�?/ � ># 11.2 ��4 � ���(�� AV/V�?�?/ �� >- 25.1 ��4 � ���(�� AV/V�?�?/ �� >, 6.6 ��4 � ���(�� AV/V�?�?/ �� >0 10.4 ��4 � ���(�� AV/V�?�?/ �� >+ 67.4 ��4 � ���(�� AV/V�?�?/ � >/ 5.9 ��4 � ���(�� AV/V�?�?/ � >�� 43.7 ��4 � ���(�� AV/V�?�?/ >�� 10.1 ��4 � ���(�� AV/V�?�?/ � >�! 12.6 ��4 � ���(�� AV/V�?�?/ � >�$ 2.5 ��4 � ���(�� AV/V�?�?/ � >�# 10.1 ��4 � ���(�� AV/V�?�?/ � >�- 15.1 ��4 � ���(�� AV/V�?�?/ 8�� >�, 0.256 �B� AV/V�?�?/ 8�� >�0 0.985 �B� AV/V�?�?/ 8� >�+ 0.945 �B� AV/V�?�?/ 8�� >�/ 1.14 �B� AV/V�?�?/ 8�� >!� 0.505 �B� AV/V�?�?/ 8�� >!� 0.735 �B� AV/V�?�?/ 8�� >!! 6.3 �B� AV/V�?�?/ 8� >!$ 9.93 �B� AV/V�?�?/ 7� >!# 0.45 �B � ���(��

Page 74: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

66

CDEF _HI`FI FP HL. aPHPF NEHOF GHLjF SRJP AV/V�?�?/ 7� >!- 3.12 �B � ���(�� AV/V�?�?/ 7 >!, 0.72 �B � ���(�� AV/V�?�?/ 7� >!0 0.9 �B � ���(�� AV/V�?�?/ 7� >!+ 0.18 �B � ���(�� AV/V�?�?/ 7� >!/ 0.72 �B � ���(�� AV/V�?�?/ 7� >$� 1.05 �B � ���(�� AV/V�?�?/ �� >$� 2.1 ����� AV/V�?�?/ ��� >$! 5.0 ����� AV/V�?�?/ ��� >$$ 20 ����� AV/V�?�?/ 9��� >$# 0.910 �4 � ���(��

(2) AV/V�?�?/ 9�� >$- 0.4 ��� (2) AV/V�?�?/ 9�� >$, 0.3 ��� (2) AV/V�?�?/ 9�� >$0 0.15 ��� AV/V�?�?/ �� >$+ 70 ��� � ���(�� AV/V�?�?/ ��� >$/ 10 ��� � ���(�� AV/V�?�?/ � >#� 20 ��� � ���(�� AV/V�?�?/ /���

� >#� 155 ��� � ���(�� AV/V�?�?/ /���� >#! 20 ��� � ���(�� AV/V�?�?/ /���� >#$ 35 ��� � ���(�� AV/V�?�?/ (� >## 25 ����� AV/V�?�?/ () >#- 65 ����� AV/V�?�?/ ,� >#, 7.035 ��� AV/V�?�?/ ,� >#0 6.51623 ��� AV/V�?�?/ ,� >#+ 0.33827 ��� AV/V�?�?/ ,� >#/ 5.304 ��� AV/V�?�?/ ,� >-� 5.82113 ��� AV/V�?�?/ ,� >-� 86.81 ��� AV/V�?�?/ ,� >-! 2.7 ��� AV/V�?�?/ ,� >-$ 0.388 ��� AV/V�?�?/ ,� >-# 1.425 ��� AV/V�?�?/ ,� >-- 1.406 ��� AV/V�?�?/ ,� >-, 0.6199 ��� AV/V�?�?/ ,� >-0 101 ��� AV/V�?�?/ ,� >-+ 0.4969 ��� AV/V�?�?/ ,� >-/ 1.2088 ��� AV/V�?�?/ ,� >,� 1.138 ��� AV/V�?�?/ ,� >,� 1.669 ��� AV/V�?�?/ ,� >,! 21.43 ��� AV/V�?�?/ ,� >,$ 0.8885 ���

Page 75: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

67

CDEF _HI`FI FP HL. aPHPF NEHOF GHLjF SRJP AV/V�?�?/ ,� >,# 2.0 ��� AV/V�?�?/ ,� >,- 0.549 ��� AV/V�?�?/ ,� >,, 5.6648 ��� AV/V�?�?/ ,� >,0 5.6589 ��� AV/V�?�?/ ,� >,+ 2.4375 ��� AV/V�?�?/ ,� >,/ 1.48 ��� AV/V�?�?/ ,� >0� 71 ��� AV/V�?�?/ ,� >0� 71 ��� AV/V�?�?/ ,� >0! 0.011 ��� AV/V�?�?/ ,� >0$ 0.872 ��� AV/V�?�?/ ,� >0# 330 ��� AV/V�?�?/ ,� >0- 2.9285 ��� AV/V�?�?/ ,� >0, 2.095 ��� AV/V�?�?/ ,� >00 4.18 ��� AV/V�?�?/ ,� >0+ 91.89 ��� AV/V�?�?/ ,� >0/ 0.6191 ��� AV/V�?�?/ ,� >+� 1.3102 ��� AV/V�?�?/ ,� >+� 0.61016 ��� AV/V�?�?/ ,� >+! 1.0571 ��� AV/V�?�?/ ,� >+$ 15.15 ��� AV/V�?�?/ ,� >+# 0.46981 ��� AV/V�?�?/ ,� >+- 460 ��� � �4(��

Page 76: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

68

Page 77: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

69

Appendix D: Results per model and per meal uptake pattern

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Bergman and spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Bergman and spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Bergman and spread3

Page 78: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

70

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Bergman-basal and spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Bergman-basal and spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Bergman-basal and spread3

Page 79: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

71

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-blood and spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-blood and spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-blood and spread3

Page 80: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

72

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-tissue and spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Sorensen-tissue and spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Sorensen-tissue and spread3

Page 81: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

73

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-plasma-blood and spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

conce

ntr

atio

n [

mm

ol/

l] Sorensen-plasma-blood and spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-plasma-blood and spread3

Page 82: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

74

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-plasma-tissue and spread1

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-plasma-tissue and spread2

0 20 40 60 80 1000

5

10

15

20

25

Percentage of time

Glu

cose

co

nce

ntr

atio

n [

mm

ol/

l] Sorensen-plasma-tissue and spread3

Page 83: Modelling a type 1 diabetes mellitus patient based on physiological knowledge

75