📄 slcp.mdl
字号:
Line {
SrcBlock "theta dot"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 40]
Branch {
Points [-220, 0; 0, -20]
DstBlock "Mux1"
DstPort 4
}
Branch {
DstBlock "out_2"
DstPort 1
}
}
Branch {
DstBlock "theta"
DstPort 1
}
}
Line {
SrcBlock "Fcn4"
SrcPort 1
Points [25, 0; 0, -15]
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Fcn5"
SrcPort 1
Points [35, 0; 0, -30]
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "theta"
SrcPort 1
Points [40, 0]
Branch {
Points [0, -65; -445, 0; 0, 70]
Branch {
DstBlock "Fcn4"
DstPort 1
}
Branch {
Points [0, 30]
DstBlock "Fcn5"
DstPort 1
}
}
Branch {
DstBlock "out_1"
DstPort 1
}
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [101, 155, 119, 175]
Orientation up
NamePlacement alternate
Value "1"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType SubSystem
Name "Double click\non this for demo.5"
Ports [0, 0, 0, 0, 0]
Position [35, 247, 176, 280]
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
ToolBar off
StatusBar off
ScreenColor white
PaperOrientation landscape
PaperPositionMode auto
PaperType usletter
PaperUnits inches
}
}
Block {
BlockType "S-Function"
Name "Fuzzy Logic Controller"
Ports [1, 1, 0, 0, 0]
Position [220, 254, 275, 306]
Orientation left
FunctionName "sffis"
Parameters "fismatrix"
PortCounts "[]"
SFunctionModules "sfsup"
MaskType "FIS"
MaskDescription "FIS"
MaskHelp "Fuzzy Inference System"
MaskPromptString "FIS Matrix:"
MaskStyleString "edit"
MaskTunableValueString "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 "fismatrix"
}
Block {
BlockType Mux
Name "Mux"
Ports [4, 1, 0, 0, 0]
Position [300, 70, 340, 105]
Orientation up
ShowName off
Inputs "4"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1, 0, 0, 0]
Position [315, 263, 350, 297]
Orientation left
ShowName off
Inputs "4"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1, 0, 0, 0]
Position [425, 124, 455, 151]
ShowName off
Inputs "2"
}
Block {
BlockType Scope
Name "Scope"
Ports [1, 0, 0, 0, 0]
Position [470, 127, 490, 153]
ShowName off
Floating off
Location [738, 621, 1018, 841]
Open off
Grid on
TickLabels on
ZoomMode on
TimeRange "10.000000"
YMin "-2.000000"
YMax "2.000000"
SaveToWorkspace off
SaveName "ScopeData"
LimitMaxRows on
MaxRows "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1, 0, 0, 0]
Position [375, 230, 395, 250]
Orientation down
ShowName off
Inputs "+-"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Switch
Name "Switch"
Position [160, 114, 185, 146]
Threshold "0"
}
Block {
BlockType SignalGenerator
Name "Target Position"
Position [35, 103, 80, 137]
WaveForm square
Amplitude "1.500000"
Frequency "0.628320"
Units "rad/sec"
}
Block {
BlockType Constant
Name "Target Position\n(Mouse-Driven)"
Position [122, 185, 148, 205]
Orientation up
NamePlacement alternate
Value "0.153846"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Line {
SrcBlock "Target Position"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [0, -20]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Target Position\n(Mouse-Driven)"
SrcPort 1
Points [0, -40]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, -15]
DstBlock "Animation"
DstPort 1
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 4
Points [80, 0; 0, 95]
DstBlock "Mux1"
DstPort 4
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [145, 0]
Branch {
Points [55, 0]
Branch {
DstBlock "Mux2"
DstPort 1
}
Branch {
DstBlock "Sum"
DstPort 2
}
}
Branch {
DstBlock "Mux"
DstPort 4
}
}
Line {
SrcBlock "Fuzzy Logic Controller"
SrcPort 1
Points [-10, 0; 0, -100]
Branch {
Points [0, -60]
DstBlock "Mux"
DstPort 3
}
Branch {
DstBlock "Cart & Pole\nDynamics"
DstPort 1
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 3
Points [25, 0]
Branch {
Points [65, 0]
Branch {
Points [0, -40]
DstBlock "Mux2"
DstPort 2
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Branch {
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Mux"
DstPort 1
}
Branch {
Points [105, 0; 0, 110]
DstBlock "Mux1"
DstPort 1
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 2
Points [110, 0; 0, 105]
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 30]
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Fuzzy Logic Controller"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -