📄 mophong_inverted_pendulum_pd_goc_vitri.mdl
字号:
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType SubSystem
Name "EmptySubsystem"
Ports []
Position [115, 50, 145, 80]
TreatAsAtomicUnit off
System {
Name "EmptySubsystem"
Location [146, 180, 902, 673]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
}
}
}
}
Block {
BlockType Gain
Name "Kd"
Position [390, 320, 420, 350]
Orientation "left"
NamePlacement "alternate"
}
Block {
BlockType Gain
Name "Kd1"
Position [180, 165, 210, 195]
}
Block {
BlockType Gain
Name "Kp"
Position [180, 115, 210, 145]
}
Block {
BlockType Gain
Name "Kp2"
Position [395, 255, 425, 285]
Orientation "left"
NamePlacement "alternate"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [570, 198, 575, 247]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function\nInverted Pendulum"
Ports [1, 1]
Position [360, 102, 480, 158]
ForegroundColor "blue"
FunctionName "Pendulum_sfunc"
MaskDisplay "disp('INVERTED PENDULUM');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Scope
Name "Scope"
Ports [2]
Position [605, 111, 640, 149]
Location [260, 398, 584, 637]
Open off
NumInputPorts "2"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
axes2 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
axes2 ""
}
YMin "0~-5"
YMax "5~5"
SaveToWorkspace on
SaveName "y"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [365, 54, 395, 86]
Location [188, 365, 512, 604]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [605, 206, 640, 244]
Location [260, 398, 584, 637]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
SaveToWorkspace on
SaveName "y1"
DataFormat "StructureWithTime"
LimitDataPoints off
}
Block {
BlockType Step
Name "Step"
Position [35, 115, 65, 145]
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [120, 120, 140, 140]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [305, 120, 325, 140]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [335, 260, 355, 280]
Orientation "left"
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [260, 120, 280, 140]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Line {
SrcBlock "S-Function\nInverted Pendulum"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 150]
Branch {
DstBlock "Kp2"
DstPort 1
}
Branch {
Points [0, 65]
DstBlock "Derivative1"
DstPort 1
}
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [15, 0]
Branch {
DstBlock "Scope"
DstPort 2
}
Branch {
Points [0, 65]
Branch {
Points [0, 5; -400, 0]
DstBlock "Sum"
DstPort 2
}
Branch {
Points [0, 5]
DstBlock "Mux"
DstPort 1
}
}
}
Line {
SrcBlock "Step"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Kp"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "Kd1"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope2"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "S-Function\nInverted Pendulum"
DstPort 1
}
Branch {
Points [0, -60]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [-15, 0]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Kp2"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Derivative1"
SrcPort 1
DstBlock "Kd"
DstPort 1
}
Line {
SrcBlock "Kd"
SrcPort 1
Points [-40, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Kp"
SrcPort 1
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
Points [5, 0]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Kd1"
SrcPort 1
DstBlock "Derivative"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -