📄 daolibai.mdl
字号:
}
}
Block {
BlockType Constant
Name "Constant"
Position [121, 155, 139, 175]
Orientation "up"
NamePlacement "alternate"
Value "1"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Constant
Name "Constant1"
Position [80, 70, 100, 90]
NamePlacement "alternate"
ShowName off
Value "1"
}
Block {
BlockType SubSystem
Name "Double click\non this for demo.5"
Ports [0, 0, 0, 0, 0]
Position [30, 362, 171, 395]
DropShadow on
ShowName off
OpenFcn "initcp"
ShowPortLabels off
MaskDisplay "disp('Variable Initialization')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Double click\non this for demo.5"
Location [-10, 380, 117, 533]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
}
}
Block {
BlockType "S-Function"
Name "Fuzzy Logic Controller"
Ports [1, 1, 0, 0, 0]
Position [230, 344, 285, 396]
Orientation "left"
FunctionName "sffis"
Parameters "fismatrix"
PortCounts "[]"
SFunctionModules "sfsup"
MaskType "FIS"
MaskDescription "FIS"
MaskHelp "Fuzzy Inference System"
MaskPromptString "FIS Matrix:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskInitialization "fismatrix = @1;"
MaskDisplay "plot(0, -0.3, 6, -0.3, 0, 1.2, 6, 1.2, [0 6], ["
"0 0], [1 2 3],[0 1 0],[2 3 4],[0 1 0],[3 4 5],[0 1 0])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "fismat"
}
Block {
BlockType Mux
Name "Mux"
Ports [5, 1, 0, 0, 0]
Position [335, 70, 375, 105]
Orientation "up"
ShowName off
Inputs "5"
DisplayOption "none"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Mux
Name "Mux1"
Ports [5, 1, 0, 0, 0]
Position [320, 342, 360, 398]
Orientation "left"
ShowName off
Inputs "5"
DisplayOption "none"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1, 0, 0, 0]
Position [465, 124, 495, 151]
ShowName off
Inputs "2"
DisplayOption "none"
}
Block {
BlockType Scope
Name "Scope"
Ports [1, 0, 0, 0, 0]
Position [515, 127, 535, 153]
ShowName off
Floating off
Location [526, 27, 806, 247]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10.000000"
YMin "-2"
YMax "2"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1, 0, 0, 0, 0]
Position [515, 177, 535, 203]
ShowName off
Floating off
Location [-13, 301, 267, 521]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10.000000"
YMin "-2"
YMax "2"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1, 0, 0, 0, 0]
Position [510, 217, 530, 243]
ShowName off
Floating off
Location [15, 318, 295, 538]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10.000000"
YMin "-1.5"
YMax "1.5"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope3"
Ports [1, 0, 0, 0, 0]
Position [510, 317, 530, 343]
ShowName off
Floating off
Location [483, 335, 763, 555]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10.000000"
YMin "-0.4"
YMax "0.4"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope4"
Ports [1, 0, 0, 0, 0]
Position [510, 272, 530, 298]
ShowName off
Floating off
Location [269, 33, 549, 253]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10.000000"
YMin "-3"
YMax "3"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope5"
Ports [1, 0, 0, 0, 0]
Position [510, 347, 530, 373]
ShowName off
Floating off
Location [12, 57, 292, 277]
Open off
NumInputPorts "1"
TickLabels "on"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "10.000000"
YMin "-0.4"
YMax "0.4"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Matrix"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [405, 255, 425, 275]
Orientation "down"
ShowName off
IconShape "rectangular"
Inputs "+-"
SaturateOnIntegerOverflow on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1, 0, 0, 0]
Position [160, 65, 180, 85]
ShowName off
IconShape "rectangular"
Inputs "++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Name "Switch"
Position [175, 114, 200, 146]
Threshold "0"
}
Block {
BlockType SignalGenerator
Name "Target Position"
Position [55, 103, 100, 137]
WaveForm "square"
Amplitude "1.500000"
Frequency "0.628320"
Units "rad/sec"
}
Block {
BlockType Constant
Name "Target Position\n(Mouse-Driven)"
Position [137, 185, 163, 205]
Orientation "up"
NamePlacement "alternate"
Value "0.53636"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType SignalGenerator
Name "Target Position1"
Position [65, 28, 110, 62]
ShowName off
WaveForm "sine"
Amplitude "0.500000"
Frequency "6.000000"
Units "rad/sec"
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Fuzzy Logic Controller"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 90]
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 3
Points [35, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [65, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -75; 25, 0]
Branch {
DstBlock "Mux2"
DstPort 2
}
Branch {
Points [15, 0; 0, 45]
DstBlock "Scope1"
DstPort 1
}
}
}
}
Line {
SrcBlock "Fuzzy Logic Controller"
SrcPort 1
Points [-15, 0; 0, -170; 25, 0]
Branch {
DstBlock "Cart & Pole\nDynamics"
DstPort 1
}
Branch {
Points [-5, 0; 0, -80]
DstBlock "Mux"
DstPort 3
}
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [160, 0]
Branch {
DstBlock "Mux"
DstPort 4
}
Branch {
Points [55, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
Points [25, 0]
Branch {
DstBlock "Mux2"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Scope2"
DstPort 1
}
}
}
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, -15]
DstBlock "Animation"
DstPort 1
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Target Position\n(Mouse-Driven)"
SrcPort 1
Points [0, -40]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, -20]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Target Position"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [55, 0; 0, 65]
Branch {
DstBlock "Cart & Pole\nDynamics"
DstPort 2
}
Branch {
Points [135, 0]
Branch {
DstBlock "Mux"
DstPort 5
}
Branch {
Points [15, 0; 0, 250]
DstBlock "Mux1"
DstPort 5
}
}
}
Line {
SrcBlock "Target Position1"
SrcPort 1
Points [10, 0; 0, 25]
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 1
Points [0, 0]
Branch {
Points [25, 0]
Branch {
Points [105, 0; 0, 160]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Mux"
DstPort 1
}
}
Branch {
Points [0, 140]
DstBlock "Scope3"
DstPort 1
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 4
Points [90, 0; 0, 50]
Branch {
Points [0, 95]
DstBlock "Mux1"
DstPort 4
}
Branch {
DstBlock "Scope4"
DstPort 1
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 2
Points [120, 0; 0, 155]
Branch {
DstBlock "Mux1"
DstPort 2
}
Branch {
DstBlock "Scope5"
DstPort 1
}
}
Annotation {
Position [202, 52]
VerticalAlignment "top"
Text "pole\nlength"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -