📄 shower.mdl
字号:
Name "max flow\nvariation"
Position [35, 93, 80, 127]
Amplitude "0.000000"
Frequency "0.101325"
Units "rad/sec"
}
Block {
BlockType Constant
Name "temp (cold)"
Position [45, 208, 80, 242]
Value "10"
}
Block {
BlockType SubSystem
Name "valve\nsetting\n(cold)"
Ports [1, 1]
Position [75, 20, 115, 50]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Limited Integrator."
MaskDescription "Limited Integrator"
MaskHelp "Implements a limited integrator with \\nan "
"expression of the form:\\n\\nif(x<=lb and u<0) or (x>=ub and u>0)\\n xdot=0"
"\\nelse\\n xdot=u"
MaskPromptString "Lower bound:|Upper bound:|Initial condition"
":"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskInitialization "lower_limit=@1;upper_limit=@2;X0=@3;"
MaskDisplay "plot(-1,-0.2,3.5,1.2,[0.05,1,2,2.9],[0,0,1,"
"1]);disp(' 1/s ')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.001|2|0.1"
System {
Name "valve\nsetting\n(cold)"
Location [452, 229, 1117, 789]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Inport"
Position [25, 85, 45, 105]
}
Block {
BlockType Constant
Name "Constant"
Position [325, 179, 395, 201]
ShowName off
Value "upper_limit"
}
Block {
BlockType Constant
Name "Constant1"
Position [325, 345, 390, 365]
ShowName off
Value "lower_limit"
}
Block {
BlockType Constant
Name "Constant2"
Position [20, 135, 40, 155]
Value "0"
}
Block {
BlockType Constant
Name "Constant3"
Position [355, 260, 375, 280]
ShowName off
Value "0"
}
Block {
BlockType Constant
Name "Constant4"
Position [355, 425, 375, 445]
ShowName off
Value "0"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [165, 99, 200, 141]
InitialCondition "X0"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [570, 280, 605, 315]
ShowName off
}
Block {
BlockType Logic
Name "Logical\nOperator1"
Ports [2, 1]
Position [490, 200, 525, 235]
ShowName off
Operator "OR"
}
Block {
BlockType Logic
Name "Logical\nOperator2"
Ports [2, 1]
Position [490, 360, 525, 395]
ShowName off
Operator "OR"
}
Block {
BlockType RelationalOperator
Name "Relational\noperator"
Position [415, 151, 445, 204]
ShowName off
Operator "<="
}
Block {
BlockType RelationalOperator
Name "Relational\noperator1"
Position [415, 312, 445, 368]
ShowName off
}
Block {
BlockType RelationalOperator
Name "Relational\noperator2"
Position [415, 231, 445, 284]
ShowName off
Operator "<="
}
Block {
BlockType RelationalOperator
Name "Relational\noperator3"
Position [415, 396, 445, 449]
ShowName off
}
Block {
BlockType Saturate
Name "Saturation"
Position [325, 110, 350, 130]
UpperLimit "upper_limit"
LowerLimit "lower_limit"
}
Block {
BlockType Switch
Name "Switch"
Position [110, 80, 135, 160]
Threshold "0.5"
}
Block {
BlockType Outport
Name "Outport"
Position [515, 110, 535, 130]
InitialOutput "0"
}
Line {
SrcBlock "Constant4"
SrcPort 1
DstBlock "Relational\noperator3"
DstPort 2
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Relational\noperator2"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
Points [10, 0; 0, -75]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Relational\noperator3"
SrcPort 1
Points [10, 0; 0, -40]
DstBlock "Logical\nOperator2"
DstPort 2
}
Line {
SrcBlock "Relational\noperator1"
SrcPort 1
Points [10, 0; 0, 30]
DstBlock "Logical\nOperator2"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
Points [10, 0; 0, 70]
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Relational\noperator2"
SrcPort 1
Points [15, 0; 0, -35]
DstBlock "Logical\nOperator1"
DstPort 2
}
Line {
SrcBlock "Relational\noperator"
SrcPort 1
Points [15, 0; 0, 30]
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
Points [15, 0; 0, 190; -540, 0; 0, -370]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Relational\noperator1"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Relational\noperator"
DstPort 2
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Inport"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Switch"
DstPort 1
}
Branch {
Points [0, 150]
Branch {
DstBlock "Relational\noperator2"
DstPort 1
}
Branch {
Points [0, 165]
DstBlock "Relational\noperator3"
DstPort 1
}
}
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [0, 0]
Branch {
Points [40, 0; 0, 45; 70, 0]
Branch {
Points [0, 160]
DstBlock "Relational\noperator1"
DstPort 1
}
Branch {
DstBlock "Relational\noperator"
DstPort 1
}
}
Branch {
DstBlock "Saturation"
DstPort 1
}
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Outport"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "out_1"
Position [350, 35, 370, 55]
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_2"
Position [140, 215, 160, 235]
Port "2"
InitialOutput "0"
}
Line {
SrcBlock "max\nflow"
SrcPort 1
Points [15, 0; 0, -65]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "max flow\nvariation"
SrcPort 1
DstBlock "max\nflow"
DstPort 1
}
Line {
SrcBlock "max flow\nconstant"
SrcPort 1
Points [35, 0; 0, -45]
DstBlock "max\nflow"
DstPort 2
}
Line {
SrcBlock "temp (cold)"
SrcPort 1
DstBlock "out_2"
DstPort 1
}
Line {
SrcBlock "flow rate\n(cold)"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "valve\nsetting\n(cold)"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "flow rate\n(cold)"
DstPort 1
}
Line {
SrcBlock "valve\nsetting\n(cold)"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "flow\nerror"
Ports [2, 1]
Position [445, 115, 465, 135]
Inputs "-+"
}
Block {
BlockType SubSystem
Name "flow\nsetpoint"
Ports [0, 1]
Position [440, 49, 470, 81]
Orientation "left"
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "flow\nsetpoint"
Location [645, 535, 879, 748]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Sum
Name "flow"
Ports [2, 1]
Position [120, 30, 140, 50]
}
Block {
BlockType Constant
Name "flow\nsetpoint"
Position [40, 21, 75, 49]
Value ".7"
}
Block {
BlockType SignalGenerator
Name "flow\nvariation"
Position [40, 93, 85, 127]
WaveForm "square"
Amplitude "0.200000"
Frequency "0.300000"
Units "rad/sec"
}
Block {
BlockType Outport
Name "out_1"
Position [170, 30, 190, 50]
InitialOutput "0"
}
Line {
SrcBlock "flow\nsetpoint"
SrcPort 1
DstBlock "flow"
DstPort 1
}
Line {
SrcBlock "flow\nvariation"
SrcPort 1
Points [5, 0; 0, -65]
DstBlock "flow"
DstPort 2
}
Line {
SrcBlock "flow"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
}
}
Block {
BlockType Fcn
Name "flow rate"
Position [300, 120, 340, 140]
Expr "u(1)+u(3)"
}
Block {
BlockType SubSystem
Name "hot water\nvalve"
Ports [1, 2]
Position [60, 89, 105, 136]
ShowPortLabels off
TreatAsAtomicUnit off
System {
Name "hot water\nvalve"
Location [49, 76, 456, 352]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "in_1"
Position [30, 25, 50, 45]
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [220, 26, 250, 59]
Inputs "2"
}
Block {
BlockType Fcn
Name "flow rate\n(hot)"
Position [280, 35, 320, 55]
Expr "k*u(1)*((k*u(1))<=u(2)) + u(2)*((k*u(1))>u("
"2))"
}
Block {
BlockType Sum
Name "max\nflow"
Ports [2, 1]
Position [150, 105, 170, 125]
}
Block {
BlockType Constant
Name "max flow\nconstant"
Position [50, 155, 70, 175]
}
Block {
BlockType SignalGenerator
Name "max flow\nvariation"
Position [40, 93, 85, 127]
Amplitude "0.000000"
Frequency "0.300000"
Units "rad/sec"
}
Block {
BlockType Constant
Name "temp (hot)"
Position [45, 208, 80, 242]
Value "30"
}
Block {
BlockType SubSystem
Name "valve\nsetting\n(hot)"
Ports [1, 1]
Position [75, 20, 115, 50]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Limited Integrator."
MaskDescription "Limited Integrator"
MaskHelp "Implements a limited integrator with \\nan "
"expression of the form:\\n\\nif(x<=lb and u<0) or (x>=ub and u>0)\\n xdot=0"
"\\nelse\\n xdot=u"
MaskPromptString "Lower bound:|Upper bound:|Initial condition"
":"
MaskStyleString "edit,edit,edit"
MaskTunableValueString "on,on,on"
MaskCallbackString "||"
MaskEnableString "on,on,on"
MaskVisibilityString "on,on,on"
MaskToolTipString "on,on,on"
MaskVarAliasString ",,"
MaskInitialization "lower_limit=@1;upper_limit=@2;X0=@3;"
MaskDisplay "plot(-1,-0.2,3.5,1.2,[0.05,1,2,2.9],[0,0,1,"
"1]);disp(' 1/s ')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.001|2|.1"
System {
Name "valve\nsetting\n(hot)"
Location [452, 229, 1117, 789]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Inport"
Position [25, 85, 45, 105]
}
Block {
BlockType Constant
Name "Constant"
Position [325, 179, 395, 201]
ShowName off
Value "upper_limit"
}
Block {
BlockType Constant
Name "Constant1"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -