Matematisk Model for Mavesækkens Tømning - Danmarks Tekniske ...
Matematisk Model for Mavesækkens Tømning - Danmarks Tekniske ...
Matematisk Model for Mavesækkens Tømning - Danmarks Tekniske ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
18<br />
106 MATLAB kode til simulering af <strong>for</strong>søgsscenarie<br />
19 % ========================================================================<br />
20 % Modified 23.07.2009 SW<br />
21 % ========================================================================<br />
22 if nargin < 4<br />
23 xinit = [0 0 55.9483 23.3399 5.7626 0.0295 0.0047 0.2997 −0 0]';<br />
24 end<br />
25 x = fsolve(@WrapHovorka<strong>Model</strong>2Pancreas,xinit,[],u,ug,d,par);<br />
26 xss = abs(x);<br />
27 Gss = xss(3,1)/par.VG;<br />
28 Iss = xss(5,1);<br />
Listing D.4: WrapHovorka<strong>Model</strong>2Pancreas.m<br />
1 function xdot = WrapHovorka<strong>Model</strong>2Pancreas(x,u,ug,d,par)<br />
2 %WRAPHOVORKAMODEL The Hovorka model <strong>for</strong> the glucoregulatory system<br />
3 %<br />
4 % The function implements the Hovorka model <strong>for</strong> the gluco−regulatory system<br />
5 % including absorption of food and iv administration of short−acting<br />
6 % insulin together with Cobelli model <strong>for</strong> endogeneous insulin production.<br />
7 %<br />
8 % The model is in the <strong>for</strong>m<br />
9 %<br />
10 % xdot(t) = (dx/dt)(t) = f(x(t),u,ug,d,par)<br />
11 %<br />
12 % with<br />
13 %<br />
14 % time : t [min]<br />
15 % States: x = [D1; D2; S1; S2; Q1; Q2; I; x1; x2; x3; Ipo; Y]<br />
16 % D1: Glucose compartment 1 in stomach/gut [mmol]<br />
17 % D2: Glucose compartment 2 in stomach/gut [mmol]<br />
18 % S1: Insulin compartment 1 SC layer [mU]<br />
19 % S2: Insulin compartment 2 SC layer [mU]<br />
20 % Q1: Plasma glucose (measurable) [mmol]<br />
21 % Q2: Adipose glucose (non−measurable) [mmol]<br />
22 % I : Plasma insulin [mU/L]<br />
23 % x1: Insulin action on distribution/transport Q1−>Q2<br />
24 % x2: Insulin action utilization in cells<br />
25 % x3: Insulin action on EGP.<br />
26 % Ipo:Insulin in portal vein [pmol/kg]<br />
27 % Y : [mU/min]<br />
28 % MVs : u = intraveneous insulin injection [mU/min]<br />
29 % : ug = intraveneous glucose injection [g/min]<br />
30 % DVs : d = CHO consumption [g/min]<br />
31 % Parameters: par = {k12; ka1; ka2; ke; tauD; tauS; AG; kb1; kb2; VI; VG;<br />
32 % EGP0; F01; MwG; gamma; K; alpha; beta; Sb; Gss}<br />
33 % (this is a struct).<br />
34 %<br />
35 % The parameters may be constructed using the function<br />
36 % HovorkaParametersPancreas.<br />
37 %<br />
38 % Syntax: xdot = WrapHovorka<strong>Model</strong>2Pancreas(x,u,ug,d,par)<br />
39<br />
40 % ========================================================================