📄 mymodel3.mdl
字号:
}
Block {
BlockType Fcn
Name "Fcn"
Position [410, 88, 465, 122]
Orientation "left"
ShowName off
Expr "exp(-0.2*u)"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [400, 231, 500, 269]
Orientation "left"
ShowName off
Expr "exp(-5*u)*sin(2*u+6)"
}
Block {
BlockType Gain
Name "Gain1"
Position [155, 204, 190, 236]
ShowName off
Gain "Kd"
}
Block {
BlockType Gain
Name "Gain2"
Position [110, 154, 145, 186]
ShowName off
Gain "Kp"
}
Block {
BlockType Integrator
Name "Int"
Ports [1, 1]
Position [425, 145, 455, 175]
}
Block {
BlockType Integrator
Name "Int1"
Ports [1, 1]
Position [355, 145, 385, 175]
}
Block {
BlockType Integrator
Name "Int2"
Ports [1, 1]
Position [230, 40, 260, 70]
}
Block {
BlockType Reference
Name "Manual \nSwitch"
Ports [2, 1]
Position [210, 142, 240, 178]
SourceBlock "simulink/Signal\nRouting/Manual Switch"
SourceType "Manual Switch"
sw "0"
action "0"
}
Block {
BlockType TransferFcn
Name "PI controller"
Position [115, 97, 175, 133]
Numerator "[Kp Ki]"
Denominator "[1 0]"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [350, 98, 375, 122]
Orientation "left"
ShowName off
}
Block {
BlockType Product
Name "Product1"
Ports [2, 1]
Position [345, 198, 370, 222]
Orientation "left"
ShowName off
}
Block {
BlockType Product
Name "Product2"
Ports [2, 1]
Position [180, 39, 200, 66]
ShowName off
InputSameDT off
}
Block {
BlockType Saturate
Name "Saturation"
Position [250, 139, 300, 181]
UpperLimit "2"
LowerLimit "-2"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [550, 184, 580, 216]
Location [1, 56, 1025, 767]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
TimeRange "4 "
YMin "-1"
YMax "1"
SaveToWorkspace on
SaveName "yy"
DataFormat "Array"
LimitDataPoints off
}
Block {
BlockType Step
Name "Step"
Position [15, 155, 45, 185]
Time "0"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [315, 150, 335, 170]
ShowName off
IconShape "round"
Inputs "-+-"
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [65, 160, 85, 180]
ShowName off
IconShape "round"
Inputs "|+-"
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [170, 160, 190, 180]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType Outport
Name "Out2"
Position [310, 48, 340, 62]
NamePlacement "alternate"
ShowName off
}
Line {
SrcBlock "Int1"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Int"
DstPort 1
}
Branch {
Points [0, -45]
DstBlock "Product"
DstPort 2
}
}
Line {
SrcBlock "Int"
SrcPort 1
Points [50, 0; -25, 0]
Branch {
Points [0, 45]
DstBlock "Product1"
DstPort 1
}
Branch {
Points [40, 0; 0, 40]
Branch {
Points [0, 85; -450, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
DstBlock "Scope"
DstPort 1
}
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Int1"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
Points [-35, 0]
Branch {
Points [0, 0]
Branch {
DstBlock "Fcn"
DstPort 1
}
Branch {
DstBlock "Fcn1"
DstPort 1
}
}
Branch {
Points [0, -85; -350, 0]
DstBlock "Product2"
DstPort 1
}
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
Points [-20, 0]
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
Points [-10, 0]
DstBlock "Product1"
DstPort 2
}
Line {
SrcBlock "Product1"
SrcPort 1
Points [-15, 0]
DstBlock "Sum"
DstPort 3
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, -55]
Branch {
Points [0, -55]
DstBlock "Abs"
DstPort 1
}
Branch {
DstBlock "PI controller"
DstPort 1
}
}
Branch {
Points [0, 0]
Branch {
DstBlock "Derivative"
DstPort 1
}
Branch {
DstBlock "Gain2"
DstPort 1
}
}
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "Sum1"
DstPort 1
}
Line {
SrcBlock "Int2"
SrcPort 1
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "Product2"
SrcPort 1
DstBlock "Int2"
DstPort 1
}
Line {
SrcBlock "Abs"
SrcPort 1
DstBlock "Product2"
DstPort 2
}
Line {
SrcBlock "Manual \nSwitch"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "PI controller"
SrcPort 1
Points [0, 35]
DstBlock "Manual \nSwitch"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Manual \nSwitch"
DstPort 2
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [10, 0; 0, -20; -25, 0]
DstBlock "Sum2"
DstPort 2
}
Annotation {
Name "\\int t |e| dt"
Position [325, 74]
TeXMode on
FontName "Arial"
FontSize 14
}
Annotation {
Position [600, 294]
}
Annotation {
Name "PD controller"
Position [150, 250]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -