📄 shower.mdl
字号:
SrcBlock "Saturation"
SrcPort 1
DstBlock "Outport"
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 "Switch"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Relational\noperator"
DstPort 2
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Relational\noperator1"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
Points [15, 0; 0, 190; -540, 0; 0, -370]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Relational\noperator"
SrcPort 1
Points [15, 0; 0, 30]
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Relational\noperator2"
SrcPort 1
Points [15, 0; 0, -35]
DstBlock "Logical\nOperator1"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
Points [10, 0; 0, 70]
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Relational\noperator1"
SrcPort 1
Points [10, 0; 0, 30]
DstBlock "Logical\nOperator2"
DstPort 1
}
Line {
SrcBlock "Relational\noperator3"
SrcPort 1
Points [10, 0; 0, -40]
DstBlock "Logical\nOperator2"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
Points [10, 0; 0, -75]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Relational\noperator2"
DstPort 2
}
Line {
SrcBlock "Constant4"
SrcPort 1
DstBlock "Relational\noperator3"
DstPort 2
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Saturation"
DstPort 1
}
Branch {
Points [40, 0; 0, 45; 70, 0]
Branch {
Points [0, 160]
DstBlock "Relational\noperator1"
DstPort 1
}
Branch {
DstBlock "Relational\noperator"
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 "valve\nsetting\n(hot)"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "flow rate\n(hot)"
DstPort 1
}
Line {
SrcBlock "in_1"
SrcPort 1
DstBlock "valve\nsetting\n(hot)"
DstPort 1
}
Line {
SrcBlock "flow rate\n(hot)"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "temp (hot)"
SrcPort 1
DstBlock "out_2"
DstPort 1
}
Line {
SrcBlock "max flow\nconstant"
SrcPort 1
Points [35, 0; 0, -45]
DstBlock "max\nflow"
DstPort 2
}
Line {
SrcBlock "max flow\nvariation"
SrcPort 1
DstBlock "max\nflow"
DstPort 1
}
Line {
SrcBlock "max\nflow"
SrcPort 1
Points [15, 0; 0, -65]
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType Fcn
Name "temp"
Position [300, 160, 340, 180]
Expr "(u(1)*u(2) + u(3)*u(4))/(u(1)+u(3))"
}
Block {
BlockType Sum
Name "temp\nerror"
Ports [2, 1, 0, 0, 0]
Position [445, 165, 465, 185]
Inputs "+-"
}
Block {
BlockType Scope
Name "temp\nscope"
Ports [1, 0, 0, 0, 0]
Position [255, 207, 275, 233]
Orientation left
Floating off
Location [597, 147, 816, 307]
Open on
Grid on
TickLabels on
ZoomMode on
TimeRange "50.000000"
YMin "-30.000000"
YMax "30.000000"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "temp\nsetpoint"
Ports [0, 1, 0, 0, 0]
Position [400, 209, 430, 241]
Orientation left
ShowPortLabels off
System {
Name "temp\nsetpoint"
Location [885, 667, 1119, 904]
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 "temp\nsetpoint"
Position [40, 21, 75, 49]
Value "23"
}
Block {
BlockType SignalGenerator
Name "temp\nvariation"
Position [40, 93, 85, 127]
WaveForm square
Amplitude "4.000000"
Frequency "0.214320"
Units "rad/sec"
}
Block {
BlockType Outport
Name "out_1"
Position [170, 30, 190, 50]
Port "1"
OutputWhenDisabled held
InitialOutput "0"
}
Line {
SrcBlock "flow"
SrcPort 1
DstBlock "out_1"
DstPort 1
}
Line {
SrcBlock "temp\nvariation"
SrcPort 1
Points [5, 0; 0, -65]
DstBlock "flow"
DstPort 2
}
Line {
SrcBlock "temp\nsetpoint"
SrcPort 1
DstBlock "flow"
DstPort 1
}
}
}
Line {
SrcBlock "cold water\nvalve"
SrcPort 1
Points [5, 0; 0, -25]
DstBlock "Mux2"
DstPort 3
}
Line {
SrcBlock "hot water\nvalve"
SrcPort 1
Points [15, 0]
DstBlock "Mux2"
DstPort 1
}
Line {
SrcBlock "hot water\nvalve"
SrcPort 2
Points [5, 0; 0, 20]
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "cold water\nvalve"
SrcPort 2
Points [15, 0]
DstBlock "Mux2"
DstPort 4
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [-35, 0; 0, -80]
DstBlock "cold water\nvalve"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [-45, 0; 0, -175]
DstBlock "hot water\nvalve"
DstPort 1
}
Line {
SrcBlock "Mux3"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Fuzzy Logic Controller"
DstPort 1
}
Branch {
Points [-20, 0; 0, 50]
DstBlock "To Workspace"
DstPort 1
}
}
Line {
SrcBlock "temp\nerror"
SrcPort 1
Points [10, 0; 0, 100]
DstBlock "Mux3"
DstPort 1
}
Line {
SrcBlock "flow\nerror"
SrcPort 1
Points [20, 0; 0, 165]
DstBlock "Mux3"
DstPort 2
}
Line {
SrcBlock "Fuzzy Logic Controller"
SrcPort 1
Points [-5, 0]
Branch {
DstBlock "Demux"
DstPort 1
}
Branch {
Points [-10, 0; 0, 50]
DstBlock "To Workspace1"
DstPort 1
}
}
Line {
SrcBlock "Mux2"
SrcPort 1
Points [50, 0]
Branch {
Points [0, -20]
DstBlock "flow rate"
DstPort 1
}
Branch {
Points [60, 0]
DstBlock "temp"
DstPort 1
}
}
Line {
SrcBlock "Mux4"
SrcPort 1
DstBlock "temp\nscope"
DstPort 1
}
Line {
SrcBlock "temp"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "temp\nerror"
DstPort 1
}
Branch {
Points [20, 0; 0, 40]
DstBlock "Mux4"
DstPort 1
}
}
Line {
SrcBlock "temp\nsetpoint"
SrcPort 1
Points [0, 0]
Branch {
Points [-15, 0; 0, -45]
DstBlock "temp\nerror"
DstPort 2
}
Branch {
DstBlock "Mux4"
DstPort 2
}
}
Line {
SrcBlock "Mux5"
SrcPort 1
DstBlock "flow\nscope"
DstPort 1
}
Line {
SrcBlock "flow rate"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "flow\nerror"
DstPort 2
}
Branch {
Points [35, 0; 0, -50]
DstBlock "Mux5"
DstPort 2
}
}
Line {
SrcBlock "flow\nsetpoint"
SrcPort 1
Points [0, 0]
Branch {
Points [-15, 0; 0, 55]
DstBlock "flow\nerror"
DstPort 1
}
Branch {
DstBlock "Mux5"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -