📄 pendulum.mdl
字号:
Orientation "left"
UpperLimit "0.75"
LowerLimit "-0.75"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Gain
Name "k1"
Position [540, 515, 570, 545]
Orientation "left"
Gain "150"
}
Block {
BlockType Gain
Name "k2"
Position [485, 575, 515, 605]
Orientation "left"
Gain "100"
}
Block {
BlockType Gain
Name "k3"
Position [550, 575, 580, 605]
Orientation "left"
Gain "-1"
}
Block {
BlockType Gain
Name "kd"
Position [510, 420, 540, 450]
Orientation "left"
Gain "-55"
}
Block {
BlockType Gain
Name "ke"
Position [440, 515, 470, 545]
Orientation "left"
Gain "0.005"
}
Block {
BlockType Gain
Name "kec"
Position [435, 575, 465, 605]
Orientation "left"
Gain "0.0075"
}
Block {
BlockType Gain
Name "kp"
Position [510, 375, 540, 405]
Orientation "left"
Gain "-350"
}
Block {
BlockType Gain
Name "ku"
Position [210, 190, 240, 220]
Gain "90"
}
Block {
BlockType SubSystem
Name "pendulum"
Ports [1, 4]
Position [395, 132, 490, 288]
TreatAsAtomicUnit off
MaskType "pendulum"
MaskDescription "Inverted Pendulum"
MaskPromptString "Initial Conditions(cart position,cart velocity,"
"angle and angular velocity);"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "Init_cond=@1;"
MaskInitialization "\n"
MaskDisplay "plot(-4,-1,4,6,[0 3 2.8 -0.2 0],[1 5 5.15 1.15 "
"1],[-1 -1 1 1 -1],[1 0 0 1 1],[-3.5 3.5],[0 0])"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[0, 0, 0.1, 0]"
System {
Name "pendulum"
Location [0, 74, 996, 728]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "F"
Position [20, 273, 50, 287]
}
Block {
BlockType Fcn
Name "Fcn"
Position [655, 490, 715, 520]
Expr "1/u"
}
Block {
BlockType Constant
Name "I"
Position [295, 555, 325, 585]
Value "0.0034"
}
Block {
BlockType Integrator
Name "Integrator1"
Ports [1, 1]
Position [980, 270, 1010, 300]
}
Block {
BlockType Integrator
Name "Integrator2"
Ports [1, 1]
Position [1020, 485, 1050, 515]
InitialCondition "0.1"
}
Block {
BlockType Integrator
Name "Integrator3"
Ports [1, 1]
Position [1110, 485, 1140, 515]
InitialCondition "Init_cond(3)"
}
Block {
BlockType Integrator
Name "Integrator4"
Ports [1, 1]
Position [900, 269, 930, 301]
}
Block {
BlockType Constant
Name "M"
Position [70, 700, 100, 730]
Value "1.096"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [200, 431, 245, 464]
InputSameDT off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [200, 521, 245, 554]
InputSameDT off
}
Block {
BlockType Product
Name "Product10"
Ports [2, 1]
Position [810, 266, 855, 299]
InputSameDT off
}
Block {
BlockType Product
Name "Product11"
Ports [2, 1]
Position [545, 571, 590, 604]
InputSameDT off
}
Block {
BlockType Product
Name "Product12"
Ports [2, 1]
Position [800, 486, 845, 519]
InputSameDT off
}
Block {
BlockType Product
Name "Product13"
Ports [2, 1]
Position [945, 481, 990, 514]
InputSameDT off
}
Block {
BlockType Product
Name "Product14"
Ports [2, 1]
Position [115, 316, 160, 349]
InputSameDT off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [285, 486, 330, 519]
InputSameDT off
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [440, 426, 485, 459]
InputSameDT off
}
Block {
BlockType Product
Name "Product4"
Ports [3, 1]
Position [300, 318, 345, 352]
Inputs "3"
InputSameDT off
}
Block {
BlockType Product
Name "Product5"
Ports [2, 1]
Position [495, 646, 540, 679]
InputSameDT off
}
Block {
BlockType Product
Name "Product6"
Ports [2, 1]
Position [525, 331, 570, 364]
InputSameDT off
}
Block {
BlockType Product
Name "Product7"
Ports [2, 1]
Position [380, 146, 425, 179]
InputSameDT off
}
Block {
BlockType Product
Name "Product8"
Ports [2, 1]
Position [610, 241, 655, 274]
InputSameDT off
}
Block {
BlockType Product
Name "Product9"
Ports [2, 1]
Position [530, 471, 575, 504]
InputSameDT off
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [1045, 184, 1075, 216]
Location [261, 332, 585, 571]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "-515"
YMax "-435"
DataFormat "StructureWithTime"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [1190, 559, 1220, 591]
Location [55, 366, 379, 605]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [370, 525, 400, 545]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [605, 495, 625, 515]
ShowName off
IconShape "round"
Inputs "|-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [390, 679, 425, 721]
ShowName off
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum3"
Ports [3, 1]
Position [430, 259, 460, 331]
ShowName off
Inputs "|-++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [485, 62, 525, 118]
ShowName off
Inputs "|-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum5"
Ports [2, 1]
Position [685, 262, 715, 318]
ShowName off
Inputs "|-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [880, 559, 910, 621]
ShowName off
Inputs "|-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction1"
Ports [1, 1]
Position [300, 375, 330, 405]
Operator "cos"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction2"
Ports [1, 1]
Position [205, 120, 235, 150]
}
Block {
BlockType Gain
Name "b"
Position [305, 220, 335, 250]
Gain "0.1"
}
Block {
BlockType Gain
Name "f"
Position [275, 75, 305, 105]
Gain "0"
}
Block {
BlockType Gain
Name "g"
Position [305, 155, 335, 185]
Gain "9.8"
}
Block {
BlockType Constant
Name "l"
Position [80, 515, 110, 545]
Value "0.25"
}
Block {
BlockType Constant
Name "m"
Position [80, 425, 110, 455]
Value "0.109"
}
Block {
BlockType Outport
Name "x1"
Position [1045, 278, 1075, 292]
}
Block {
BlockType Outport
Name "x2"
Position [980, 163, 1010, 177]
Port "2"
}
Block {
BlockType Outport
Name "x3"
Position [1205, 493, 1235, 507]
Port "3"
}
Block {
BlockType Outport
Name "x4"
Position [1185, 388, 1215, 402]
Port "4"
}
Line {
SrcBlock "m"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Product"
DstPort 1
}
Branch {
Points [0, 55]
Branch {
DstBlock "Product2"
DstPort 1
}
Branch {
Points [0, 205]
DstBlock "Sum2"
DstPort 1
}
}
}
Line {
SrcBlock "l"
SrcPort 1
Points [0, 0; 50, 0]
Branch {
Points [0, -75]
DstBlock "Product"
DstPort 2
}
Branch {
DstBlock "Product1"
DstPort 1
}
Branch {
Points [0, 15]
DstBlock "Product1"
DstPort 2
}
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [20, 0]
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Product2"
SrcPort 1
Points [20, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "I"
SrcPort 1
Points [55, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [10, 0; 0, -5]
Branch {
Points [0, -175]
DstBlock "Product6"
DstPort 2
}
Branch {
Points [20, 0; 0, 125]
DstBlock "Product5"
DstPort 1
}
}
Line {
SrcBlock "Product"
SrcPort 1
Points [0, 0; 20, 0]
Branch {
DstBlock "Product3"
DstPort 2
}
Branch {
Points [0, -105]
Branch {
DstBlock "Product4"
DstPort 3
}
Branch {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -