Model { Name "glucose" Version 2.09 SimParamPage Solver SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off PaperOrientation landscape PaperType usletter PaperUnits inches StartTime "0.0" StopTime "5" Solver ode1 RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep "0.01" InitialStep "0.01" FixedStep "0.01" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime on TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput on OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on SimulationMode normal RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_vc.tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off ExtModeMexFile "ext_comm" ExtModeBatchMode off BlockDefaults { Orientation right ForegroundColor black BackgroundColor white DropShadow off NamePlacement normal FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal ShowName on } AnnotationDefaults { HorizontalAlignment center VerticalAlignment middle ForegroundColor black BackgroundColor white DropShadow off FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight normal FontAngle normal } System { Name "glucose" Location [-4, 91, 466, 537] Open on ScreenColor white Block { BlockType ToWorkspace Name "Blood Glucose\nConcentration\n(mg/mL)" Position [375, 30, 435, 60] VariableName "x" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType ToWorkspace Name "Blood Insulin\nConcentration\n(mU/ML)" Position [380, 305, 440, 335] VariableName "y" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType Scope Name "Glucose Concentration" Ports [1, 0, 0, 0, 0] Position [380, 120, 410, 150] Floating off Location [471, 64, 795, 303] Open on Grid on TickLabels on ZoomMode on TimeRange "5" YMin "0" YMax "3" SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Reference Name "Glucose Infusion" Ports [0, 1, 0, 0, 0] Position [20, 180, 50, 210] SourceBlock "simulink/Sources/Pulse\nGenerator" SourceType "Pulse Generator" period "5" duty "5" amplitude "100000" start "0.5" } Block { BlockType ToWorkspace Name "Glucose Infusion Rate\n(mg/hr)" Position [210, 20, 270, 50] VariableName "u" Buffer "inf" Decimation "1" SampleTime "-1" } Block { BlockType SubSystem Name "Glucose-Insulin\nRegulation Model" Ports [1, 2, 0, 0, 0] Position [135, 79, 310, 306] ShowPortLabels on System { Name "Glucose-Insulin\nRegulation Model" Location [-70, 88, 455, 544] Open on ScreenColor white Block { BlockType Inport Name "In1" Position [50, 103, 80, 117] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType Gain Name "Beta" Position [280, 225, 330, 255] Orientation left Gain "1430" } Block { BlockType Gain Name "Glucose\nCapacitance" Position [235, 119, 295, 161] Gain "1/15000" } Block { BlockType Constant Name "Glucose Input \nFlow Rate" Position [25, 140, 65, 160] Value "8400" } Block { BlockType Gain Name "Insulin\nCapacitance" Position [280, 307, 335, 343] Gain "1/15000" } Block { BlockType Gain Name "Insulin Destruction Gain" Position [215, 364, 260, 396] Orientation left Gain "7600" } Block { BlockType Integrator Name "Integrator" Ports [1, 1, 0, 0, 0] Position [330, 125, 360, 155] ExternalReset none InitialConditionSource internal InitialCondition "0.81" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Integrator Name "Integrator1" Ports [1, 1, 0, 0, 0] Position [385, 310, 415, 340] ExternalReset none InitialConditionSource internal InitialCondition "0.055" LimitOutput off UpperSaturationLimit "inf" LowerSaturationLimit "-inf" ShowSaturationPort off ShowStatePort off AbsoluteTolerance "auto" } Block { BlockType Gain Name "Lambda" Position [270, 74, 315, 106] Orientation left Gain "2470" } Block { BlockType Gain Name "Mu" Position [215, 30, 265, 60] Orientation left Gain "7200" } Block { BlockType Gain Name "Nu" Position [95, 206, 145, 244] Gain "139000" } Block { BlockType Product Name "Product" Ports [2, 1, 0, 0, 0] Position [50, 207, 80, 238] Inputs "2" } Block { BlockType Constant Name "Reabsorption\nMaximum" Position [435, 30, 465, 50] Orientation left Value "2.5" } Block { BlockType Sum Name "Sum" Ports [4, 1, 0, 0, 0] Position [175, 108, 205, 167] Inputs "--+-" } Block { BlockType Sum Name "Sum1" Ports [2, 1, 0, 0, 0] Position [285, 27, 315, 58] Orientation left Inputs "-+" } Block { BlockType Sum Name "Sum2" Ports [2, 1, 0, 0, 0] Position [355, 222, 385, 253] Orientation left Inputs "+-" } Block { BlockType Sum Name "Sum3" Ports [2, 1, 0, 0, 0] Position [195, 307, 225, 338] Inputs "+-" } Block { BlockType Sum Name "Sum4" Ports [2, 1, 0, 0, 0] Position [105, 137, 135, 168] Inputs "++" } Block { BlockType Constant Name "Threshold Glucose\nConcentration (Phi)" Position [420, 233, 470, 257] Orientation left Value "0.51" } Block { BlockType Saturate Name "Thresholding\nOperator" Position [140, 30, 170, 60] Orientation left UpperLimit "100000" LowerLimit "0" } Block { BlockType Saturate Name "Thresholding\nOperator1" Position [210, 225, 240, 255] Orientation left UpperLimit "100000" LowerLimit "0" } Block { BlockType Outport Name "Out1" Position [445, 108, 475, 122] Port "1" OutputWhenDisabled held InitialOutput "0" } Block { BlockType Outport Name "Out2" Position [470, 318, 500, 332] Port "2" OutputWhenDisabled held InitialOutput "0" } Line { SrcBlock "In1" SrcPort 1 Points [0, 35] DstBlock "Sum4" DstPort 1 } Line { SrcBlock "Integrator1" SrcPort 1 Points [30, 0] Branch { DstBlock "Out2" DstPort 1 } Branch { Points [5, 0; 0, 50] Branch { Points [0, 5] DstBlock "Insulin Destruction Gain" DstPort 1 } Branch { Points [0, 55; -420, 0] DstBlock "Product" DstPort 2 } } } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Glucose\nCapacitance" DstPort 1 } Line { SrcBlock "Glucose\nCapacitance" SrcPort 1 DstBlock "Integrator" DstPort 1 } Line { SrcBlock "Lambda" SrcPort 1 Points [-105, 0] DstBlock "Sum" DstPort 1 } Line { SrcBlock "Reabsorption\nMaximum" SrcPort 1 Points [-100, 0] DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Sum1" SrcPort 1 DstBlock "Mu" DstPort 1 } Line { SrcBlock "Mu" SrcPort 1 DstBlock "Thresholding\nOperator" DstPort 1 } Line { SrcBlock "Threshold Glucose\nConcentration (Phi)" SrcPort 1 DstBlock "Sum2" DstPort 2 } Line { SrcBlock "Sum2" SrcPort 1 DstBlock "Beta" DstPort 1 } Line { SrcBlock "Beta" SrcPort 1 DstBlock "Thresholding\nOperator1" DstPort 1 } Line { SrcBlock "Sum3" SrcPort 1 DstBlock "Insulin\nCapacitance" DstPort 1 } Line { SrcBlock "Thresholding\nOperator1" SrcPort 1 Points [-50, 0; 0, 75] DstBlock "Sum3" DstPort 1 } Line { SrcBlock "Insulin Destruction Gain" SrcPort 1 Points [-65, 0; 0, -50] DstBlock "Sum3" DstPort 2 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Nu" DstPort 1 } Line { SrcBlock "Integrator" SrcPort 1 Points [20, 0] Branch { Points [20, 0] Branch { Points [20, 0; 0, -25] Branch { DstBlock "Out1" DstPort 1 } Branch { Points [0, -25; -25, 0] Branch { Points [0, -40] DstBlock "Sum1" DstPort 2 } Branch { DstBlock "Lambda" DstPort 1 } } } Branch { Points [0, 90] DstBlock "Sum2" DstPort 1 } } Branch { Points [0, 50; -355, 0; 0, 25] DstBlock "Product" DstPort 1 } } Line { SrcBlock "Nu" SrcPort 1 Points [10, 0] DstBlock "Sum" DstPort 4 } Line { SrcBlock "Thresholding\nOperator" SrcPort 1 Points [-20, 0; 0, 85] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Sum4" SrcPort 1 Points [20, 0] DstBlock "Sum" DstPort 3 } Line { SrcBlock "Glucose Input \nFlow Rate" SrcPort 1 Points [10, 0] DstBlock "Sum4" DstPort 2 } Line { SrcBlock "Insulin\nCapacitance" SrcPort 1 DstBlock "Integrator1" DstPort 1 } } } Block { BlockType Scope Name "Insulin Concentration" Ports [1, 0, 0, 0, 0] Position [390, 235, 420, 265] Floating off Location [471, 323, 795, 562] Open on Grid on TickLabels on ZoomMode on TimeRange "5" YMin "0" YMax "0.2" SaveToWorkspace off SaveName "ScopeData" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Line { SrcBlock "Glucose-Insulin\nRegulation Model" SrcPort 1 Points [35, 0] Branch { DstBlock "Glucose Concentration" DstPort 1 } Branch { Points [0, -90] DstBlock "Blood Glucose\nConcentration\n(mg/mL)" DstPort 1 } } Line { SrcBlock "Glucose-Insulin\nRegulation Model" SrcPort 2 Points [30, 0] Branch { DstBlock "Insulin Concentration" DstPort 1 } Branch { Points [0, 70] DstBlock "Blood Insulin\nConcentration\n(mU/ML)" DstPort 1 } } Line { SrcBlock "Glucose Infusion" SrcPort 1 Points [40, 0] Branch { DstBlock "Glucose-Insulin\nRegulation Model" DstPort 1 } Branch { Points [0, -160] DstBlock "Glucose Infusion Rate\n(mg/hr)" DstPort 1 } } } }