motorola.mdl
来自「书籍代码:遗传演算法原理与应用_活用MATLAB(Source Code)」· MDL 代码 · 共 1,568 行 · 第 1/3 页
MDL
1,568 行
Position [435, 38, 465, 52]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "u"
Position [255, 98, 285, 112]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Transport\nDelay"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn\nof Motor plant"
SrcPort 1
DstBlock "Integrator"
DstPort 1
}
Line {
SrcBlock "Transport\nDelay"
SrcPort 1
Points [15, 0]
Branch {
Points [0, 60]
DstBlock "u"
DstPort 1
}
Branch {
DstBlock "Kd1"
DstPort 1
}
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "Kd4"
DstPort 1
}
Line {
SrcBlock "Kd4"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Kd1"
SrcPort 1
DstBlock "Transfer Fcn\nof Motor plant"
DstPort 1
}
}
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [335, 26, 340, 64]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [30, 295, 60, 325]
Mean "0"
Variance "1"
Seed "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [360, 30, 390, 60]
Floating off
Location [7, 59, 238, 218]
Open on
NumInputPorts "1"
TickLabels "on"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
Grid "on"
TimeRange "0.8"
YMin "-1000"
YMax "2000"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "Array"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [435, 245, 465, 275]
Floating off
Location [7, 274, 238, 433]
Open on
NumInputPorts "1"
TickLabels "on"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
Grid "on"
TimeRange "0.8"
YMin "-10"
YMax "20"
SaveToWorkspace off
SaveName "ScopeData1"
DataFormat "Array"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [25, 130, 55, 160]
Time "0.2"
Before "0"
After "1000"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Step
Name "Step1"
Position [25, 200, 55, 230]
Time "0.33"
Before "0"
After "10"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Step
Name "Step2"
Position [25, 250, 55, 280]
Time "0.48"
Before "0"
After "-10"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [370, 125, 390, 145]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [145, 125, 165, 145]
IconShape "round"
Inputs "+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum2"
Ports [3, 1]
Position [105, 235, 135, 265]
ShowName off
IconShape "round"
Inputs "|+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [115, 300, 135, 320]
ShowName off
IconShape "round"
Inputs "|++"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
Name "To Workspace"
Position [75, 63, 95, 87]
VariableName "t"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace1"
Position [475, 284, 495, 306]
VariableName "y"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [445, 79, 465, 101]
VariableName "y1"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace5"
Position [475, 218, 495, 242]
VariableName "u"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace6"
Position [220, 62, 240, 88]
VariableName "in"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType Outport
Name "NCD Outport"
Position [345, 240, 400, 300]
DropShadow on
OpenFcn "optblock"
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
MaskType "NCD Outport"
MaskDisplay "plot([0:10],[-.5 1.5 .6 1.3 .8 1.1 .95 1.02 .99"
" 1 1]);\ndisp('\\n\\n NCD\\n OutPort 1'); "
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Outport
Name "control"
Position [315, 98, 345, 112]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "control1"
Position [340, 178, 370, 192]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Step"
SrcPort 1
DstBlock "4-point ave.\nOK"
DstPort 1
}
Line {
SrcBlock "Discrete PID\nSubsystem"
SrcPort 1
DstBlock "Motor Subsystem"
DstPort 1
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "To Workspace"
DstPort 1
}
Line {
SrcBlock "Motor Subsystem"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Discrete PID\nSubsystem"
DstPort 1
}
Line {
SrcBlock "4-point ave.\nOK"
SrcPort 1
Points [5, 0; 0, -35; 5, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -35; 25, 0]
Branch {
DstBlock "To Workspace6"
DstPort 1
}
Branch {
Points [0, 30; 95, 0]
Branch {
DstBlock "Kd3"
DstPort 1
}
Branch {
DstBlock "control"
DstPort 1
}
}
}
}
Line {
SrcBlock "Motor Subsystem"
SrcPort 2
Points [0, 10; 50, 0; 0, 65]
DstBlock "To Workspace5"
DstPort 1
}
Line {
SrcBlock "Kd1"
SrcPort 1
Points [0, -40; -35, 0; 0, -30]
DstBlock "Discrete PID\nSubsystem"
DstPort 2
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Kd2"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -45]
DstBlock "To Workspace2"
DstPort 1
}
Branch {
DstBlock "MATLAB Fcn"
DstPort 1
}
}
Line {
SrcBlock "Kd2"
SrcPort 1
Points [10, 0; 0, -25]
DstBlock "Kd5"
DstPort 1
}
Line {
SrcBlock "Kd3"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [15, 0]
DstBlock "Sum3"
DstPort 2
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Sum3"
DstPort 1
}
Line {
SrcBlock "Sum3"
SrcPort 1
DstBlock "Kd4"
DstPort 1
}
Line {
SrcBlock "Kd4"
SrcPort 1
Points [0, -25; -95, 0]
DstBlock "Sum2"
DstPort 3
}
Line {
SrcBlock "Step2"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Step1"
SrcPort 1
Points [34, 0]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Kd5"
SrcPort 1
Points [45, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
Points [40, 0]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "MATLAB Fcn"
SrcPort 1
Points [20, 0; 0, 70; -100, 0]
Branch {
Points [0, 90]
DstBlock "To Workspace1"
DstPort 1
}
Branch {
Points [-15, 0]
Branch {
Points [-70, 0]
Branch {
Points [-50, 0]
Branch {
Points [0, -150]
DstBlock "Mux"
DstPort 2
}
Branch {
Points [-35, 0]
Branch {
Points [-85, 0]
Branch {
Points [0, 20]
DstBlock "Kd1"
DstPort 1
}
Branch {
DstBlock "Sum1"
DstPort 2
}
}
Branch {
DstBlock "Kd6"
DstPort 1
}
}
}
Branch {
DstBlock "control1"
DstPort 1
}
}
Branch {
Points [0, -20]
DstBlock "Count Display"
DstPort 1
}
}
}
Line {
SrcBlock "Kd6"
SrcPort 1
DstBlock "NCD Outport"
DstPort 1
}
Annotation {
Position [91, 32]
Text "motorola.mdl. 8/21/2001.\nPenChen Chou,"
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?