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 ...
108 MATLAB kode til simulering af forsøgsscenarie 26 Tx = []; 27 G = []; 28 I = []; 29 X = []; 30 IV ins = repmat(12,1,N); % Constant rate of insulin infusion [mU/min]. 31 IV glu = zeros(1,N); 32 iv glu bolus = 0.0; % Glucosebolus at the beginning [g/min]. 33 34 % Control algorithm for iv glucoseadministration. 35 for t = 0:5:N−2 36 if t == 0 37 Xx = xss; 38 end 39 IV glu(t+1:t+5) = IV glu(t+1:t+5)+iv glu bolus; 40 [tx,Gx,Ix,Xx] = HovorkaModelSimulation2Pancreas... 41 (T(t+1):T(t+5),Xx,IV ins(t+1:t+5),IV glu(t+1:t+5),D(t+1:t+5),par); 42 Xx = Xx(end,:)'; 43 if Gx > BS 44 iv glu bolus = iv glu bolus − 0.25; 45 elseif Gx < BS 46 iv glu bolus = iv glu bolus + 0.25; 47 end 48 if iv glu bolus < 0 49 iv glu bolus = 0; 50 end 51 Tx = [Tx; tx(1)]; 52 G = [G; Gx(1)]; 53 I = [I; Ix(1)]; 54 X = [X; Xx(1)]; 55 end 56 57 % Plot of glucose concentration in plasma. 58 h = figure(1); 59 subplot(221) 60 plot([Tx(1) Tx(end)],[5 5],'r−',Tx,G,'b−','linewidth',2); grid; 61 xlabel('time [min]','fontsize',14); ylabel('G (mmol/L)','fontsize',14); 62 ylim([0 10]); xlim([Tx(1) Tx(end)]); 63 text(60,6,'\downarrow','fontsize',14) 64 hold on; 65 fill([Tx(1) Tx(end) Tx(end) Tx(1)],... 66 [70/par.MwG*10 70/par.MwG*10 140/par.MwG*10 140/par.MwG*10],... 67 'g','facealpha',0.2) 68 hold off 69 set(get(h,'CurrentAxes'),'fontsize',14) 70 legend('Target value of BS','Actual value of BS','Location','NorthEast') 71 72 % Plot of insulin concentration in plasma. 73 subplot(222) 74 plot(Tx,I,'b−','linewidth',2); 75 grid; xlabel('time [min]','fontsize',14); ylabel('I (mU/L)','fontsize',14); 76 xlim([Tx(1) Tx(end)]) 77 set(get(h,'CurrentAxes'),'fontsize',14) 78 79 % Plot of oral glucose load and iv glucose infusion. 80 T=T/60;
109 81 subplot(223) 82 stairs(T,D,'b−','linewidth',2) 83 hold on 84 stairs(T,IV glu,'m−','linewidth',2); grid; 85 xlabel('time [hr]','fontsize',14); ylabel('Glucose (g/min)','fontsize',14); 86 xlim([T(1) T(end)]); ylim([0 10]); 87 text(2.5,7,['Total glucose = ' num2str(sum(IV glu)) 'g'],'fontsize',12) 88 set(get(h,'CurrentAxes'),'fontsize',14) 89 legend('Meal','IV glucose') 90 91 % Plot of iv insulin infusion. 92 subplot(224) 93 stairs(T,IV ins,'b−','linewidth',2); grid; 94 xlabel('time [hr]','fontsize',14); 95 ylabel('Insulin infusion (mU/min)','fontsize',14); 96 xlim([T(1) T(end)]); ylim([0 max(IV ins)+1]); 97 set(get(h,'CurrentAxes'),'fontsize',14) 1 clear all; close all; 2 Listing D.7: experiment simulation pan con 10.m 3 % Parameters for the Steady State. 4 BodyWeight = 70.0; 5 par = HovorkaParametersPancreas(BodyWeight); 6 uss = 0.0; % Basal rate of insulin. 7 dss = 0.0; % Basal rate of glucose. 8 9 % Compute Steady State. 10 Ipo0 = par.Sb; 11 xinit = [0 0 55.9483 23.3399 5.7677 0.0295 0.0047 0.2997 Ipo0 0]'; 12 [Gss,Iss,xss]=HovorkaBasalState2Pancreas(uss,0,dss,par,xinit); 13 gss = Gss*par.MwG/10; 14 15 Ts = 10; % Time to eat the glucose [min]. 16 dmeal = 40/Ts; % Amount of oral glucose [g/min] 17 18 T = 0:1:5*60; % Time of simulation [min]. 19 N = length(T); 20 21 D = repmat(dss,1,N); 22 idd = round([60 61 62 63 64 65 66 67 68 69] + 1); % Time for meal [min]. 23 D(1,idd) = D(1,idd)+dmeal; % Meal vector. 24 25 BS = 10; % Target value of blood glucose [mmol/L]. 26 Tx = []; 27 G = []; 28 I = []; 29 X = []; 30 IV ins = repmat(uss,1,N); % None insulin infusion [mU/min]. 31 IV glu = zeros(1,N); 32 iv glu bolus = 5; % Glucosebolus at the beginning [g/min]. 33 34 % Control algorithm for iv glucoseadministration.
- Page 71 and 72: 5.3 7 modeller for mavesækkens tø
- Page 73 and 74: 5.4 Sammenligning af de 7 modeller
- Page 75 and 76: 5.5 Resume af Kapitel 5 61 5.5 Resu
- Page 77 and 78: Kapitel 6 Simulering af forsøgssce
- Page 79 and 80: 6.1 Hovorka modellen 65 ˙Q1(t) = U
- Page 81 and 82: 6.2 Implementering af model for bug
- Page 83 and 84: 6.2 Implementering af model for bug
- Page 85 and 86: 6.3 Simulering af clamp-forsøg 71
- Page 87 and 88: 6.3 Simulering af clamp-forsøg 73
- Page 89 and 90: 6.3 Simulering af clamp-forsøg 75
- Page 91 and 92: 6.4 Diskussion af simulering af cla
- Page 93 and 94: 6.5 Resume af Kapitel 6 79 ducerer
- Page 95 and 96: Kapitel 7 Konklusion I dette bachel
- Page 97 and 98: Bilag A MATLAB kode til kantfinding
- Page 99 and 100: 79 xlabel('Time [min]','fontsize',1
- Page 101 and 102: 22 if Data(i,j) ≥ cs 23 if Data(i
- Page 103 and 104: Bilag B MATLAB kode til fit af data
- Page 105 and 106: 82 t = 0:1:400; 83 Q = (1 + K*(t/te
- Page 107 and 108: Bilag C MATLAB kode til behandling
- Page 109 and 110: 79 % Plot of the model of Y with da
- Page 111 and 112: 189 %%%%%%%%%%%%%%%%%%%%%%%%% 1 par
- Page 113 and 114: 299 print('−dpng', '−loose', ['
- Page 115 and 116: Bilag D MATLAB kode til simulering
- Page 117 and 118: 13 % 14 % time : t [min] 103 15 % S
- Page 119 and 120: 105 123 Q2dot = Q12 − Q21 − Q2o
- Page 121: 41 % Modified 23.07.09 SW 107 42 %
- Page 125 and 126: 90 91 % Plot of iv insulin infusion
- Page 127 and 128: 99 ylabel('Insulin infusion (mU/min
- Page 129 and 130: Bilag E Billeder fra forsøg med no
- Page 131 and 132: 117 Figur E.3: Her ses forsøgspers
- Page 133 and 134: Bilag F Formelle dokumenter i forbi
- Page 135 and 136: Komitéens reg.nr. (KF)____________
- Page 138 and 139: Formål Formålet med dette projekt
- Page 140 and 141: Forsøgsprocedure Efter forudgåend
- Page 142 and 143: Publikation Forsøgsresultaterne vi
- Page 144 and 145: Effekten af hypo-, normo- og hyperg
- Page 146 and 147: Driftsomkostninger og udgifter til
- Page 148 and 149: til at dosere indsprøjtningerne af
- Page 150 and 151: Følgende annonce indrykkes på int
- Page 152 and 153: 138 LITTERATUR [10] O. Goetze, A. S
- Page 154: 140 LITTERATUR [34] K. Vollmer, H.
109<br />
81 subplot(223)<br />
82 stairs(T,D,'b−','linewidth',2)<br />
83 hold on<br />
84 stairs(T,IV glu,'m−','linewidth',2); grid;<br />
85 xlabel('time [hr]','fontsize',14); ylabel('Glucose (g/min)','fontsize',14);<br />
86 xlim([T(1) T(end)]); ylim([0 10]);<br />
87 text(2.5,7,['Total glucose = ' num2str(sum(IV glu)) 'g'],'fontsize',12)<br />
88 set(get(h,'CurrentAxes'),'fontsize',14)<br />
89 legend('Meal','IV glucose')<br />
90<br />
91 % Plot of iv insulin infusion.<br />
92 subplot(224)<br />
93 stairs(T,IV ins,'b−','linewidth',2); grid;<br />
94 xlabel('time [hr]','fontsize',14);<br />
95 ylabel('Insulin infusion (mU/min)','fontsize',14);<br />
96 xlim([T(1) T(end)]); ylim([0 max(IV ins)+1]);<br />
97 set(get(h,'CurrentAxes'),'fontsize',14)<br />
1 clear all; close all;<br />
2<br />
Listing D.7: experiment simulation pan con 10.m<br />
3 % Parameters <strong>for</strong> the Steady State.<br />
4 BodyWeight = 70.0;<br />
5 par = HovorkaParametersPancreas(BodyWeight);<br />
6 uss = 0.0; % Basal rate of insulin.<br />
7 dss = 0.0; % Basal rate of glucose.<br />
8<br />
9 % Compute Steady State.<br />
10 Ipo0 = par.Sb;<br />
11 xinit = [0 0 55.9483 23.3399 5.7677 0.0295 0.0047 0.2997 Ipo0 0]';<br />
12 [Gss,Iss,xss]=HovorkaBasalState2Pancreas(uss,0,dss,par,xinit);<br />
13 gss = Gss*par.MwG/10;<br />
14<br />
15 Ts = 10; % Time to eat the glucose [min].<br />
16 dmeal = 40/Ts; % Amount of oral glucose [g/min]<br />
17<br />
18 T = 0:1:5*60; % Time of simulation [min].<br />
19 N = length(T);<br />
20<br />
21 D = repmat(dss,1,N);<br />
22 idd = round([60 61 62 63 64 65 66 67 68 69] + 1); % Time <strong>for</strong> meal [min].<br />
23 D(1,idd) = D(1,idd)+dmeal; % Meal vector.<br />
24<br />
25 BS = 10; % Target value of blood glucose [mmol/L].<br />
26 Tx = [];<br />
27 G = [];<br />
28 I = [];<br />
29 X = [];<br />
30 IV ins = repmat(uss,1,N); % None insulin infusion [mU/min].<br />
31 IV glu = zeros(1,N);<br />
32 iv glu bolus = 5; % Glucosebolus at the beginning [g/min].<br />
33<br />
34 % Control algorithm <strong>for</strong> iv glucoseadministration.