📄 mophong_inverted_pendulum_p_goc_vitri.mdl
字号:
Ports []
Position [67, 35, 145, 77]
ForegroundColor "red"
ShowName off
List {
ListType RTWdata
document_text01 "Type your documentation here."
}
CopyFcn "docblock('breaklink',gcb);"
DeleteFcn "docblock('close_document',gcb);"
PreSaveFcn "docblock('save_document',gcb);"
OpenFcn "plot_data"
FontSize 10
TreatAsAtomicUnit off
MaskType "DocBlock"
MaskDescription "Use this block to save long descriptive text wi"
"th the model. Double-clicking the block will open an editor."
MaskPromptString "E Coder Flag|Document Type"
MaskStyleString "edit,popup(Text|RTF|HTML)"
MaskTunableValueString "off,off"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,off"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "ECoderFlag=&1;DocumentType=&2;"
MaskDisplay "plot([.8 0 0 1 1 .8 .8 1],[1 1 0 0 .8 1 .8 .8])"
";\ntext(.5,.5,'Nhan nut de ve','horizontalalignment','center');\n"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "|Text"
System {
Name "DocBlock"
Location [480, 85, 980, 386]
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 "Kp"
Position [195, 115, 225, 145]
Gain "10"
}
Block {
BlockType Gain
Name "Kp1"
Position [300, 250, 330, 280]
Orientation "left"
NamePlacement "alternate"
Gain "20"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [510, 193, 515, 242]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function\nInverted Pendulum"
Ports [1, 1]
Position [300, 102, 420, 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 [545, 111, 580, 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 [305, 49, 335, 81]
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 [545, 201, 580, 239]
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 [65, 115, 95, 145]
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [150, 120, 170, 140]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [245, 120, 265, 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, 145]
DstBlock "Kp1"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [15, 0]
Branch {
DstBlock "Scope"
DstPort 2
}
Branch {
Points [0, 60]
Branch {
Points [0, 5; -310, 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, 100]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Kp"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope2"
DstPort 1
}
Line {
SrcBlock "Kp"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "S-Function\nInverted Pendulum"
DstPort 1
}
Branch {
Points [0, -65]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Kp1"
SrcPort 1
Points [-40, 0]
DstBlock "Sum1"
DstPort 2
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -