📄 shower.mdl
字号:
}
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]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Block {
BlockType Outport
Name "out_2"
Position [140, 215, 160, 235]
Port "2"
OutputWhenDisabled held
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, 0, 0, 0]
Position [445, 115, 465, 135]
Inputs "-+"
}
Block {
BlockType Scope
Name "flow\nscope"
Ports [1, 0, 0, 0, 0]
Position [270, 62, 290, 88]
Orientation left
Floating off
Location [601, 446, 818, 608]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "50.000000"
YMin "-1.000000"
YMax "1.000000"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "flow\nsetpoint"
Ports [0, 1, 0, 0, 0]
Position [415, 49, 445, 81]
Orientation left
ShowPortLabels off
System {
Name "flow\nsetpoint"
Location [646, 595, 880, 808]
Open off
ToolBar off
StatusBar off
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Sum
Name "flow"
Ports [2, 1, 0, 0, 0]
Position [120, 30, 140, 50]
Inputs "++"
}
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]
Port "1"
OutputWhenDisabled held
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, 0, 0, 0]
Position [60, 89, 105, 136]
ShowPortLabels off
System {
Name "hot water\nvalve"
Location [49, 76, 456, 352]
Open off
ToolBar off
StatusBar off
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Inport
Name "in_1"
Position [30, 25, 50, 45]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1, 0, 0, 0]
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, 0, 0, 0]
Position [150, 105, 170, 125]
Inputs "++"
}
Block {
BlockType Constant
Name "max flow\nconstant"
Position [50, 155, 70, 175]
Value "1"
}
Block {
BlockType SignalGenerator
Name "max flow\nvariation"
Position [40, 93, 85, 127]
WaveForm sine
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, 0, 0, 0]
Position [75, 20, 115, 50]
ShowPortLabels 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"
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
ToolBar off
StatusBar off
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
Block {
BlockType Inport
Name "Inport"
Position [25, 85, 45, 105]
Port "1"
PortWidth "-1"
SampleTime "-1"
}
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, 0, 0, 0]
Position [165, 99, 200, 141]
ExternalReset none
InitialConditionSource internal
InitialCondition "X0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1, 0, 0, 0]
Position [570, 280, 605, 315]
ShowName off
Operator AND
Inputs "2"
}
Block {
BlockType Logic
Name "Logical\nOperator1"
Ports [2, 1, 0, 0, 0]
Position [490, 200, 525, 235]
ShowName off
Operator OR
Inputs "2"
}
Block {
BlockType Logic
Name "Logical\nOperator2"
Ports [2, 1, 0, 0, 0]
Position [490, 360, 525, 395]
ShowName off
Operator OR
Inputs "2"
}
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
Operator ">="
}
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
Operator ">="
}
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]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -