📄 mophong_inverted_pendulum_cfile_pi_goc_vitri.mdl
字号:
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 Integrator
Name "Integrator"
Ports [1, 1]
Position [450, 320, 480, 350]
Orientation "left"
NamePlacement "alternate"
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [230, 165, 260, 195]
}
Block {
BlockType "S-Function"
Name "Inverted Pendulum \nS-Function C File"
Ports [1, 1]
Position [355, 110, 475, 150]
FunctionName "Pendulum_Sfunc_C"
Parameters "a,b,c,d,x0"
MaskPromptString "A|B|C|D|Initialize Condition"
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 ",,,,"
MaskVariables "a=@1;b=@2;c=@3;d=@4;x0=@5;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[0,1,0,0;20.6,0,0,0;0,0,0,1;-0.4905,0,0,0]|[0;-"
"1;0;0.5]|[ 1 0 0 0;0 0 1 0]|0|0"
}
Block {
BlockType Gain
Name "Ki"
Position [390, 320, 420, 350]
Orientation "left"
NamePlacement "alternate"
Gain "100"
}
Block {
BlockType Gain
Name "Ki1"
Position [180, 165, 210, 195]
Gain "100"
}
Block {
BlockType Gain
Name "Kp"
Position [180, 115, 210, 145]
Gain "100"
}
Block {
BlockType Gain
Name "Kp2"
Position [395, 255, 425, 285]
Orientation "left"
NamePlacement "alternate"
Gain "100"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [570, 198, 575, 247]
ShowName off
Inputs "2"
DisplayOption "bar"
}
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 "Inverted Pendulum \nS-Function C File"
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 "Integrator"
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 "Ki1"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope2"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -60]
DstBlock "Scope1"
DstPort 1
}
Branch {
DstBlock "Inverted Pendulum \nS-Function C File"
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 "Integrator"
SrcPort 1
DstBlock "Ki"
DstPort 1
}
Line {
SrcBlock "Ki"
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 "Integrator1"
SrcPort 1
Points [5, 0]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Ki1"
SrcPort 1
DstBlock "Integrator1"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -