📄 slcp1.mdl
字号:
DstBlock "Fcn3"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 130]
DstBlock "Mux2"
DstPort 1
}
Branch {
DstBlock "Mux3"
DstPort 1
}
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Mux5"
DstPort 2
}
Line {
SrcBlock "Mux5"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -130]
DstBlock "Mux3"
DstPort 2
}
Branch {
Points [130, 0]
DstBlock "Mux2"
DstPort 3
}
}
Line {
SrcBlock "in_2"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Mux5"
DstPort 1
}
Annotation {
Name "half pole length"
Position [224, 199]
VerticalAlignment top
Text "half pole length"
}
Annotation {
Name "pole mass"
Position [222, 257]
VerticalAlignment top
Text "pole mass"
}
}
}
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
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 [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"
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"
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"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate none
MaskIconUnits autoscale
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1, 0, 0, 0]
Position [450, 124, 480, 151]
ShowName off
Inputs "2"
}
Block {
BlockType Scope
Name "Scope"
Ports [1, 0, 0, 0, 0]
Position [500, 127, 520, 153]
ShowName off
Floating off
Location [229, 513, 509, 733]
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 [405, 255, 425, 275]
Orientation down
ShowName off
Inputs "+-"
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
Inputs "++"
}
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 "1.5"
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 2
Points [110, 0; 0, 155]
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 1
Points [15, 0]
Branch {
Points [105, 0; 0, 160]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 3
Points [25, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [65, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -75]
DstBlock "Mux2"
DstPort 2
}
}
}
Line {
SrcBlock "Fuzzy Logic Controller"
SrcPort 1
Points [-15, 0; 0, -170; 25, 0]
Branch {
DstBlock "Cart & Pole\nDynamics"
DstPort 1
}
Branch {
Points [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 {
DstBlock "Mux2"
DstPort 1
}
}
}
Line {
SrcBlock "Cart & Pole\nDynamics"
SrcPort 4
Points [80, 0; 0, 145]
DstBlock "Mux1"
DstPort 4
}
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 [60, 0; 0, 65]
Branch {
Points [0, 85]
DstBlock "Cart & Pole\nDynamics"
DstPort 2
}
Branch {
Points [130, 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
}
Annotation {
Name "pole\nlength"
Position [202, 52]
VerticalAlignment top
Text "pole\nlength"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -