📄 tank_4.mdl
字号:
axes1 ""
}
TimeRange "100"
YMin "0"
YMax "2"
DataFormat "Array"
}
Block {
BlockType Constant
Name "Constant"
Position [30, 81, 55, 109]
}
Block {
BlockType Derivative
Name "Derivative"
Position [320, 269, 370, 301]
Orientation "left"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Reference
Name "Fuzzy Logic\nController"
Ports [1, 1]
Position [260, 130, 320, 180]
FontName "Arial"
SourceBlock "fuzblock/Fuzzy Logic \nController"
SourceType "FIS"
fis "tank"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [205, 126, 235, 159]
Inputs "2"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [575, 66, 605, 99]
Inputs "2"
}
Block {
BlockType Reference
Name "PID Controller"
Ports [1, 1]
Position [260, 35, 290, 65]
SourceBlock "simulink_extras/Additional\nLinear/PID Controll"
"er\n(with Approximate\nDerivative)"
SourceType "PID(2) Controller"
P "2"
I "0"
D "1"
N "100"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [490, 160, 520, 190]
Orientation "left"
Location [207, 553, 811, 886]
Open off
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "20.000000"
YMin "-2"
YMax "2"
DataFormat "Array"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Scope
Name "Scope4"
Ports [1]
Position [650, 125, 680, 155]
Location [78, 177, 304, 320]
Open off
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "200.000000"
YMin "-2.000000"
YMax "2.000000"
DataFormat "Array"
}
Block {
BlockType SignalGenerator
Name "Signal\nGenerator"
Position [20, 158, 65, 192]
WaveForm "square"
Amplitude "0.500000"
Frequency "0.100000"
Units "rad/sec"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [2, 1]
Position [405, 88, 455, 132]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Valve"
MaskDescription "Valve"
MaskPromptString "Initial position [0=closed 1=open]:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskInitialization "InitialPosition = @1;"
MaskDisplay "disp('VALVE')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Subsystem"
Location [408, 498, 736, 676]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "control"
Position [20, 20, 40, 40]
}
Block {
BlockType Inport
Name "source flow"
Position [20, 110, 40, 130]
Port "2"
}
Block {
BlockType SubSystem
Name "Limited Integrator"
Ports [1, 1]
Position [80, 9, 130, 51]
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\\txdot=0"
"\\nelse\\n\\txdot=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 "lb = @1; ub = @2; xi = @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|1|InitialPosition"
System {
Name "Limited Integrator"
Location [0, 0, 791, 233]
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 [20, 130, 40, 150]
}
Block {
BlockType Fcn
Name "Fcn"
Position [150, 116, 520, 154]
Expr "u[2]*((((u[1]>lb)+(u[2]>=0))>0) * (((u["
"1]<ub)+(u[2]<=0))>0))"
}
Block {
BlockType Integrator
Name "Integrator"
Ports [1, 1]
Position [540, 126, 585, 144]
InitialCondition "xi"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [85, 116, 115, 149]
Inputs "2"
}
Block {
BlockType Saturate
Name "Saturation"
Position [630, 121, 675, 149]
UpperLimit "ub"
LowerLimit "lb"
}
Block {
BlockType Outport
Name "Out_1"
Position [720, 125, 740, 145]
InitialOutput "0"
}
Line {
SrcBlock "Integrator"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Saturation"
DstPort 1
}
Branch {
Points [0, -100; -545, 0; 0, 90]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Fcn"
DstPort 1
}
Line {
SrcBlock "In_1"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Out_1"
DstPort 1
}
}
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [180, 76, 215, 134]
}
Block {
BlockType Outport
Name "out flow"
Position [250, 95, 270, 115]
InitialOutput "0"
}
Line {
SrcBlock "source flow"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "out flow"
DstPort 1
}
Line {
SrcBlock "control"
SrcPort 1
DstBlock "Limited Integrator"
DstPort 1
}
Line {
SrcBlock "Limited Integrator"
SrcPort 1
Points [25, 0; 0, 60]
DstBlock "Product"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [100, 110, 120, 150]
Inputs "+-"
}
Block {
BlockType Switch
Name "Switch"
Position [360, 72, 380, 128]
}
Block {
BlockType Saturate
Name "change"
Position [255, 269, 290, 301]
Orientation "left"
UpperLimit "0.1"
LowerLimit "-0.1"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Scope
Name "change\nscope"
Ports [1]
Position [260, 210, 290, 240]
Location [715, 630, 977, 764]
Open off
NumInputPorts "1"
TickLabels "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "20.000000"
YMin "-0.100000"
YMax "0.100000"
DataFormat "Array"
}
Block {
BlockType Constant
Name "const"
Position [310, 86, 335, 114]
}
Block {
BlockType Sum
Name "error"
Ports [2, 1]
Position [155, 125, 175, 145]
Inputs "+-"
}
Block {
BlockType SubSystem
Name "tank 2"
Ports [1, 3]
Position [470, 81, 530, 139]
ShowPortLabels off
TreatAsAtomicUnit off
MaskType "Water tank"
MaskDescription "Cylindrical water tank with overflow signal"
MaskPromptString "Height of tank (m):|Bottom area (m^2):|Out pipe"
" crossection (m^2):|Overflow sensor distance from top (m):|Initial level heig"
"ht (m):"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskInitialization "ht=@1;area=@2;outletArea=@3;overflowLimit=@4;in"
"itialHt=@5;"
MaskDisplay "disp('WATER\\nTANK')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2|1|0.05|0|0.5"
System {
Name "tank 2"
Location [528, 603, 1074, 911]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -