📄 dcmotor_3.mdl
字号:
Name "Emin Display1"
Ports [1]
Position [415, 20, 505, 50]
BackgroundColor "green"
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [265, 161, 270, 199]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [310, 221, 315, 259]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [155, 278, 175, 307]
Inputs "2"
Multiplication "Element-wise(.*)"
SaturateOnIntegerOverflow on
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [95, 357, 125, 388]
Operator ">="
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [300, 164, 330, 196]
Floating off
Location [7, 63, 200, 212]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
Grid "on"
TimeRange "6"
YMin "-1"
YMax "2"
SaveToWorkspace on
SaveName "Y"
DataFormat "Array"
LimitDataPoints on
MaxDataPoints "50000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [355, 84, 385, 116]
Floating off
Location [8, 268, 198, 417]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
Grid "on"
TimeRange "6"
YMin "-10"
YMax "10"
SaveToWorkspace on
SaveName "Y1"
DataFormat "Array"
LimitDataPoints on
MaxDataPoints "50000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Stop
Name "Stop Simulation"
Position [160, 357, 195, 393]
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [105, 290, 125, 310]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [85, 95, 105, 115]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum2"
Ports [2, 1]
Position [270, 285, 290, 305]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum3"
Ports [5, 1]
Position [495, 173, 510, 297]
ShowName off
IconShape "rectangular"
Inputs "|+++++"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [160, 184, 180, 206]
VariableName "t"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [405, 134, 425, 156]
VariableName "y"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [170, 59, 190, 81]
VariableName "in"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [340, 229, 360, 251]
VariableName "P"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace4"
Position [310, 39, 330, 61]
VariableName "T"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Display
Name "Total Error Display"
Ports [1]
Position [415, 70, 505, 100]
Orientation "left"
Format "short"
Decimation "1"
Floating off
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [295, 315, 330, 355]
Orientation "left"
X0 "0"
SampleTime "Ts"
RTWStateStorageClass "Auto"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [195, 276, 230, 314]
SampleTime "Ts"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold1"
Position [205, 211, 240, 249]
SampleTime "Ts"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold2"
Position [90, 51, 125, 89]
SampleTime "Ts"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold3"
Position [345, 126, 380, 164]
SampleTime "Ts"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold4"
Position [85, 206, 120, 244]
SampleTime "Ts"
}
Block {
BlockType Outport
Name "in"
Position [85, 178, 115, 192]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "y"
Position [225, 198, 255, 212]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "err"
Position [360, 308, 390, 322]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "stop"
Position [210, 343, 240, 357]
Port "4"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Discrete PID\nSubsystem"
SrcPort 1
Points [-10, 0; 15, 0]
Branch {
DstBlock "DC Motor Subsystem"
DstPort 1
}
Branch {
Points [0, -30; 70, 0]
Branch {
Points [60, 0]
DstBlock "Scope1"
DstPort 1
}
Branch {
Points [0, -25]
DstBlock "To Workspace4"
DstPort 1
}
}
}
Line {
SrcBlock "Band-Limited\nWhite Noise"
SrcPort 1
Points [5, 0]
Branch {
Points [0, 65]
Branch {
DstBlock "in"
DstPort 1
}
Branch {
DstBlock "Mux"
DstPort 1
}
}
Branch {
Points [0, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -35]
DstBlock "Zero-Order\nHold2"
DstPort 1
}
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Discrete PID\nSubsystem"
DstPort 1
}
Branch {
Points [0, 110]
Branch {
Points [0, 25]
DstBlock "Abs"
DstPort 1
}
Branch {
Points [75, 0]
DstBlock "Zero-Order\nHold1"
DstPort 1
}
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "DC Motor Subsystem"
SrcPort 1
Points [20, 0; 0, 40]
Branch {
Points [0, 10; -105, 0]
Branch {
Points [0, 35]
DstBlock "Mux"
DstPort 2
}
Branch {
Points [-15, 0]
Branch {
Points [-110, 0]
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [0, 50]
DstBlock "y"
DstPort 1
}
}
}
Branch {
DstBlock "Zero-Order\nHold3"
DstPort 1
}
}
Line {
SrcBlock "Clock"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 75]
DstBlock "Sum"
DstPort 1
}
Branch {
DstBlock "Zero-Order\nHold4"
DstPort 1
}
}
Line {
SrcBlock "Abs"
SrcPort 1
Points [0, 30; -35, 0]
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [65, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [50, 0; 0, 20]
Branch {
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "err"
DstPort 1
}
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-10, 0]
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Stop Simulation"
DstPort 1
}
Branch {
Points [0, -25]
DstBlock "stop"
DstPort 1
}
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [15, 0]
Branch {
DstBlock "Relational\nOperator"
DstPort 2
}
Branch {
Points [0, 20; 320, 0]
DstBlock "Emin Display1"
DstPort 1
}
}
Line {
SrcBlock "Constant2"
SrcPort 1
Points [5, 0; 0, 65]
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Constant3"
SrcPort 1
Points [10, 0; 0, 40]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Constant4"
SrcPort 1
Points [0, 10; 15, 0]
DstBlock "Sum3"
DstPort 3
}
Line {
SrcBlock "Constant5"
SrcPort 1
Points [5, 0; 0, -10]
DstBlock "Sum3"
DstPort 4
}
Line {
SrcBlock "Constant6"
SrcPort 1
Points [5, 0; 0, -35]
DstBlock "Sum3"
DstPort 5
}
Line {
SrcBlock "Sum3"
SrcPort 1
Points [15, 0]
Branch {
Points [0, -150]
DstBlock "Total Error Display"
DstPort 1
}
Branch {
Points [0, 175; -455, 0; 0, -45]
DstBlock "Relational\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "To Workspace3"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold1"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Derivative"
DstPort 1
}
}
Line {
SrcBlock "Zero-Order\nHold2"
SrcPort 1
DstBlock "To Workspace2"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold3"
SrcPort 1
DstBlock "To Workspace1"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold4"
SrcPort 1
Points [5, 0; 0, -30]
DstBlock "To Workspace"
DstPort 1
}
Annotation {
Position [67, 34]
Text "dcmotor_3.mdl\nUse GA"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -