📄 pendulum.mdl
字号:
SrcBlock "Fcn3"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
Points [-145, 0; 0, -70]
DstBlock "Subtract"
DstPort 3
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Integrator2"
DstPort 1
}
Line {
SrcBlock "Subtract1"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [105, 0]
DstBlock "Subtract1"
DstPort 3
}
Line {
SrcBlock "Fcn4"
SrcPort 1
Points [-10, 0; 0, 185]
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Product2"
SrcPort 1
DstBlock "Subtract1"
DstPort 2
}
Line {
SrcBlock "Fcn5"
SrcPort 1
Points [-10, 0; 0, 55]
DstBlock "Product2"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Subsystem1"
Ports [4, 1]
Position [480, 310, 555, 375]
Orientation "left"
NamePlacement "alternate"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "Subsystem1"
Location [2, 82, 1014, 721]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "y"
Position [125, 488, 155, 502]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "ydot"
Position [130, 528, 160, 542]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "tetha"
Position [130, 103, 160, 117]
Port "3"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "tethadot"
Position [130, 363, 160, 377]
Port "4"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Constant
Name "Constant"
Position [300, 390, 330, 420]
Value "m*L"
}
Block {
BlockType Fcn
Name "Fcn"
Position [375, 45, 435, 75]
Expr "(3/(4*L))*cos(u)"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [375, 110, 435, 140]
Expr "M+m*(1-0.75*(1+cos(2*u)))"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [375, 165, 435, 195]
Expr "(3/(4*L))*sin(u)"
}
Block {
BlockType Fcn
Name "Fcn3"
Position [370, 275, 430, 305]
Expr "m*(3/8)*g*sin(2*u)"
}
Block {
BlockType Fcn
Name "Fcn4"
Position [295, 315, 340, 345]
Expr "sin(u)"
}
Block {
BlockType Fcn
Name "Fcn5"
Position [195, 355, 240, 385]
Expr "u*u"
}
Block {
BlockType Gain
Name "Gain"
Position [420, 210, 450, 240]
Gain "25"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain1"
Position [420, 430, 450, 460]
Gain "10"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [365, 520, 395, 550]
Gain "2.6"
ParameterDataTypeMode "Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Math
Name "Math\nFunction"
Ports [1, 1]
Position [495, 45, 525, 75]
Operator "reciprocal"
}
Block {
BlockType Product
Name "Product"
Ports [3, 1]
Position [660, 53, 680, 97]
Inputs "3"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Product1"
Ports [3, 1]
Position [390, 358, 410, 402]
Inputs "3"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [775, 168, 795, 197]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Subtract1"
Ports [2, 1]
Position [485, 283, 505, 312]
Inputs "-+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Subtract2"
Ports [5, 1]
Position [570, 172, 590, 258]
Inputs "+++++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "uout"
Position [830, 178, 860, 192]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Math\nFunction"
DstPort 1
}
Line {
SrcBlock "Math\nFunction"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "tetha"
SrcPort 1
Points [30, 0; 80, 0]
Branch {
Points [0, -50]
DstBlock "Fcn"
DstPort 1
}
Branch {
Points [0, 15]
Branch {
DstBlock "Fcn1"
DstPort 1
}
Branch {
Points [0, 55]
Branch {
DstBlock "Fcn2"
DstPort 1
}
Branch {
Points [0, 45]
Branch {
DstBlock "Gain"
DstPort 1
}
Branch {
Points [0, 65]
Branch {
DstBlock "Fcn3"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Fcn4"
DstPort 1
}
}
}
}
}
}
Line {
SrcBlock "Fcn1"
SrcPort 1
Points [105, 0; 0, -50]
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Subtract2"
SrcPort 1
Points [15, 0; 0, -125]
DstBlock "Product"
DstPort 3
}
Line {
SrcBlock "Fcn2"
SrcPort 1
Points [55, 0; 0, 5]
DstBlock "Subtract2"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [50, 0; 0, -25]
DstBlock "Subtract2"
DstPort 2
}
Line {
SrcBlock "Fcn3"
SrcPort 1
DstBlock "Subtract1"
DstPort 1
}
Line {
SrcBlock "Subtract1"
SrcPort 1
Points [250, 0]
DstBlock "Subtract"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [25, 0; 0, -75]
DstBlock "Subtract1"
DstPort 2
}
Line {
SrcBlock "tethadot"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Fcn5"
DstPort 1
}
Branch {
Points [0, 75]
DstBlock "Gain1"
DstPort 1
}
}
Line {
SrcBlock "Fcn4"
SrcPort 1
Points [10, 0; 0, 35]
DstBlock "Product1"
DstPort 1
}
Line {
SrcBlock "Fcn5"
SrcPort 1
Points [65, 0; 0, 10]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [20, 0; 0, -10]
DstBlock "Product1"
DstPort 3
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [70, 0; 0, -230]
DstBlock "Subtract2"
DstPort 3
}
Line {
SrcBlock "ydot"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [150, 0; 0, -290]
DstBlock "Subtract2"
DstPort 5
}
Line {
SrcBlock "y"
SrcPort 1
Points [375, 0; 0, -265]
DstBlock "Subtract2"
DstPort 4
}
Line {
SrcBlock "Product"
SrcPort 1
Points [35, 0; 0, 100]
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "Subtract"
SrcPort 1
DstBlock "uout"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [350, 240, 370, 260]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, -75; 50, 0]
Branch {
DstBlock "Subsystem"
DstPort 1
}
Branch {
Points [0, -75]
DstBlock "Scope2"
DstPort 1
}
}
Line {
SrcBlock "Signal\nGenerator"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Subsystem"
SrcPort 3
Points [0, 0; 90, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 170]
DstBlock "Subsystem1"
DstPort 3
}
}
Line {
SrcBlock "Subsystem"
SrcPort 1
Points [35, 0]
Branch {
Points [15, 0; 0, 170]
DstBlock "Subsystem1"
DstPort 1
}
Branch {
Points [0, -35]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Subsystem"
SrcPort 2
Points [30, 0; 0, 170]
DstBlock "Subsystem1"
DstPort 2
}
Line {
SrcBlock "Subsystem"
SrcPort 4
Points [65, 0; 0, 170]
DstBlock "Subsystem1"
DstPort 4
}
Line {
SrcBlock "Subsystem1"
SrcPort 1
Points [-115, 0; 0, -40]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "Scope3"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -