⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glucos3.mdl

📁 biomedical stuffs...
💻 MDL
📖 第 1 页 / 共 2 页
字号:
Model {
  Name			  "glucos3"
  Version		  2.20
  SimParamPage		  Solver
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  off
  ShowLineWidths	  off
  StartTime		  "0.0"
  StopTime		  "1200"
  Solver		  ode23
  RelTol		  "1e-3"
  AbsTol		  "1e-3"
  Refine		  "1"
  MaxStep		  ".10"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  RefineOutputTimes
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  off
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  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
  RTWPlaceOutputsASAP	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_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		    "glucos3"
    Location		    [9, 119, 735, 705]
    Open		    on
    ToolBar		    on
    StatusBar		    on
    ScreenColor		    white
    PaperOrientation	    landscape
    PaperPositionMode	    auto
    PaperType		    usletter
    PaperUnits		    inches
    Block {
      BlockType		      Gain
      Name		      "1/VG"
      Position		      [250, 12, 275, 38]
      Gain		      ".0825"
    }
    Block {
      BlockType		      Gain
      Name		      "1/VI"
      Position		      [210, 347, 235, 373]
      Gain		      ".0825"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Blood\nGlucose"
      Position		      [665, 132, 715, 148]
      BackgroundColor	      red
      VariableName	      "glu"
      Buffer		      "1200"
      Decimation	      "1"
      SampleTime	      "1"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Bound1\nInsulin"
      Position		      [590, 447, 640, 463]
      BackgroundColor	      magenta
      VariableName	      "ib1"
      Buffer		      "1200"
      Decimation	      "1"
      SampleTime	      "1"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Bound2\nInsulin"
      Position		      [590, 547, 640, 563]
      BackgroundColor	      yellow
      VariableName	      "ib2"
      Buffer		      "1200"
      Decimation	      "1"
      SampleTime	      "1"
    }
    Block {
      BlockType		      Constant
      Name		      "CT1"
      Position		      [140, 430, 160, 450]
      Value		      "12"
    }
    Block {
      BlockType		      Sum
      Name		      "CT1-IB1"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [200, 425, 220, 445]
      Inputs		      "-+"
    }
    Block {
      BlockType		      Constant
      Name		      "CT2"
      Position		      [115, 575, 135, 595]
      Value		      "12"
    }
    Block {
      BlockType		      Sum
      Name		      "CT2-IB2"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [180, 580, 200, 600]
      Inputs		      "+-"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Free\nInsulin"
      Position		      [585, 332, 635, 348]
      BackgroundColor	      cyan
      VariableName	      "ins_free"
      Buffer		      "1200"
      Decimation	      "1"
      SampleTime	      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "G*(P1-X)"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [325, 99, 345, 121]
      ShowPortLabels	      off
      MaskType		      "Dot Product"
      MaskDescription	      "Inner (dot) product.\ny=sum(u1.*u2)"
      MaskHelp		      "Computes the inner (dot) product of the inputs:"
" sum(u1.*u2).  The inputs are vectors of the same length. Output is a scalar."
      MaskDisplay	      "disp('.\\n')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      System {
	Name			"G*(P1-X)"
	Location		[33, 479, 253, 634]
	Open			off
	ToolBar			off
	StatusBar		off
	ScreenColor		white
	PaperOrientation	landscape
	PaperPositionMode	auto
	PaperType		usletter
	PaperUnits		inches
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 25, 35, 45]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Inport
	  Name			  "in_2"
	  Position		  [15, 90, 35, 110]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [65, 55, 90, 75]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [125, 55, 145, 75]
	  Inputs		  "+"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [185, 55, 205, 75]
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "in_2"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "G0"
      Position		      [110, 175, 130, 195]
      Value		      "4.5"
    }
    Block {
      BlockType		      Gain
      Name		      "GN"
      Position		      [115, 50, 145, 80]
      Orientation	      up
      Gain		      "0"
    }
    Block {
      BlockType		      Integrator
      Name		      "Glucose"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [470, 110, 490, 130]
      BackgroundColor	      red
      ExternalReset	      none
      InitialConditionSource  internal
      InitialCondition	      "4.5"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Sum
      Name		      "Glucose\nload"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [170, 15, 190, 35]
      Inputs		      "++"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Glucose:\nmeals"
      Ports		      [0, 1, 0, 0, 0]
      Position		      [60, 2, 95, 38]
      ShowPortLabels	      off
      MaskType		      "Repeating table"
      MaskDescription	      "Repeating table.\nEnter values of time and outp"
"ut for first cycle."
      MaskHelp		      "Repeats cycle given in table. Time values shoul"
"d be monotonically increasing."
      MaskPromptString	      "Time values:|Output values:"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskInitialization      "period = max(@1); t = @1; y = @2;"
      MaskDisplay	      "plot([t,t+period,t+2*period],[y,y,y])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      MaskValueString	      "[0 300 310 315 600]|[0 0 0 0 0]"
      System {
	Name			"Glucose:\nmeals"
	Location		[5, 40, 315, 196]
	Open			off
	ToolBar			off
	StatusBar		off
	ScreenColor		white
	PaperOrientation	landscape
	PaperPositionMode	auto
	PaperType		usletter
	PaperUnits		inches
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [45, 60, 65, 80]
	  Location		  [30, 40, 140, 75]
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [110, 60, 150, 80]
	  Expr			  "rem(u[1],period)"
	}
	Block {
	  BlockType		  Lookup
	  Name			  "Look-Up Table"
	  Position		  [210, 58, 250, 82]
	  InputValues		  "t"
	  OutputValues		  "y"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [285, 60, 305, 80]
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Look-Up Table"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  DstBlock		  "Look-Up Table"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      RandomNumber
      Name		      "Glucose:\nnoise"
      Position		      [45, 77, 90, 113]
      Mean		      "0"
      Variance		      "1"
      Seed		      "129.3884756"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Constant
      Name		      "I0"
      Position		      [110, 245, 130, 265]
      Value		      "15"
    }
    Block {
      BlockType		      Sum
      Name		      "If-I0"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [220, 250, 240, 270]
      Inputs		      "-+"
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "Insulin\ninfusion"
      Position		      [20, 292, 60, 318]
      BackgroundColor	      green
      VariableName	      "[T,FI]"
    }
    Block {
      BlockType		      Sum
      Name		      "Insulin\ninput"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [95, 350, 115, 370]
      Inputs		      "++"
    }
    Block {
      BlockType		      Constant
      Name		      "Insulin\nsecretion,\nU/hr\n"
      Position		      [50, 400, 70, 420]
      Value		      "0.9"
    }
    Block {
      BlockType		      Integrator
      Name		      "InsulinB1"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [480, 445, 500, 465]
      BackgroundColor	      magenta
      ExternalReset	      none
      InitialConditionSource  internal
      InitialCondition	      ".3186"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Integrator
      Name		      "InsulinB2"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [480, 545, 500, 565]
      BackgroundColor	      yellow
      ExternalReset	      none
      InitialConditionSource  internal
      InitialCondition	      ".3186"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Integrator
      Name		      "InsulinF"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [475, 330, 495, 350]
      BackgroundColor	      cyan
      ExternalReset	      none
      InitialConditionSource  internal
      InitialCondition	      "15"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Constant
      Name		      "P1"
      Position		      [185, 70, 205, 90]
      Value		      "-0.014"
    }
    Block {
      BlockType		      SubSystem
      Name		      "P1*G0"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [175, 169, 195, 191]
      ShowPortLabels	      off
      MaskType		      "Dot Product"
      MaskDescription	      "Inner (dot) product.\ny=sum(u1.*u2)"
      MaskHelp		      "Computes the inner (dot) product of the inputs:"
" sum(u1.*u2).  The inputs are vectors of the same length. Output is a scalar."
      MaskDisplay	      "disp('.\\n')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      none
      MaskIconUnits	      autoscale
      System {
	Name			"P1*G0"
	Location		[33, 479, 253, 634]
	Open			off
	ToolBar			off
	StatusBar		off
	ScreenColor		white
	PaperOrientation	landscape
	PaperPositionMode	auto
	PaperType		usletter
	PaperUnits		inches
	Block {
	  BlockType		  Inport
	  Name			  "in_1"
	  Position		  [15, 25, 35, 45]
	  Port			  "1"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Inport
	  Name			  "in_2"
	  Position		  [15, 90, 35, 110]
	  Port			  "2"
	  PortWidth		  "-1"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1, 0, 0, 0]
	  Position		  [65, 55, 90, 75]
	  Inputs		  "2"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [1, 1, 0, 0, 0]
	  Position		  [125, 55, 145, 75]
	  Inputs		  "+"
	}
	Block {
	  BlockType		  Outport
	  Name			  "out_1"
	  Position		  [185, 55, 205, 75]
	  Port			  "1"
	  OutputWhenDisabled	  held
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "in_2"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "in_1"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "out_1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Sum
      Name		      "P1-X"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [250, 105, 270, 125]
      Inputs		      "+-"
    }
    Block {
      BlockType		      Gain
      Name		      "P2"
      Position		      [285, 197, 310, 223]
      Gain		      "-.025"
    }
    Block {
      BlockType		      Gain
      Name		      "P3"
      Position		      [285, 247, 310, 273]
      Gain		      ".000013"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Remote\nGlucose"
      Position		      [580, 222, 630, 238]
      BackgroundColor	      blue
      VariableName	      "X"
      Buffer		      "1200"
      Decimation	      "1"
      SampleTime	      "1"
    }
    Block {
      BlockType		      Integrator
      Name		      "RemoteX"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [470, 220, 490, 240]
      BackgroundColor	      blue
      ExternalReset	      none
      InitialConditionSource  internal
      InitialCondition	      "-0.000078"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [570, 67, 590, 93]
      Floating		      off
      Location		      [718, 33, 1019, 284]
      Open		      on
      Grid		      on
      TickLabels	      on
      ZoomMode		      on
      TimeRange		      "100"
      YMin		      "-5"
      YMax		      "15"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitMaxRows	      on
      MaxRows		      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Gain
      Name		      "convert\nunits"
      Position		      [140, 347, 165, 373]
      Gain		      "0.09*16.67/0.0825"
    }
    Block {
      BlockType		      Sum
      Name		      "dG/dt"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -