📄 motorold.mdl
字号:
BlockType RandomNumber
Name "Random\nNumber"
Position [25, 270, 55, 300]
Mean "0"
Variance "1"
Seed "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [2, 1]
Position [280, 287, 340, 318]
FunctionName "temp"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [315, 50, 345, 80]
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 [475, 255, 505, 285]
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 "-20"
YMax "40"
SaveToWorkspace off
SaveName "ScopeData1"
DataFormat "Array"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope2"
Ports [1]
Position [410, 290, 440, 320]
Floating off
Location [564, 413, 795, 572]
Open on
NumInputPorts "1"
TickLabels "on"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
List {
ListType SelectedSignals
axes1 ""
}
Grid "on"
TimeRange "0.6000000000000001"
YMin "0"
YMax "1500"
SaveToWorkspace off
SaveName "ScopeData2"
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 "Step noise"
Position [25, 180, 55, 210]
Time "0.33"
Before "0"
After "10"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Step
Name "Step noise1"
Position [25, 225, 55, 255]
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, 210, 135, 240]
ShowName off
IconShape "round"
Inputs "|+++"
SaturateOnIntegerOverflow on
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [110, 275, 130, 295]
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 [465, 169, 485, 191]
VariableName "y"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [250, 172, 270, 198]
VariableName "e"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace3"
Position [385, 323, 405, 347]
VariableName "u1"
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 "in"
Position [400, 83, 430, 97]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "out"
Position [340, 178, 370, 192]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "control2"
Position [235, 103, 265, 117]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Step"
SrcPort 1
Points [75, 0; 0, -35; 5, 0]
Branch {
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, -35; 25, 0]
Branch {
DstBlock "To Workspace6"
DstPort 1
}
Branch {
Labels [2, 0]
Points [0, 15; 95, 0]
Branch {
DstBlock "in"
DstPort 1
}
Branch {
Points [0, -35]
DstBlock "Mux"
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
Points [5, 0]
Branch {
Points [0, -25]
DstBlock "control2"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "To Workspace2"
DstPort 1
}
Branch {
Points [15, 0]
Branch {
DstBlock "Discrete PID\nSubsystem"
DstPort 1
}
Branch {
Points [0, 160]
DstBlock "S-Function"
DstPort 1
}
}
}
Line {
SrcBlock "Motor Subsystem"
SrcPort 2
Points [0, 10; 75, 0; 0, 65]
DstBlock "To Workspace5"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
DstBlock "Kd2"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "MATLAB Fcn"
DstPort 1
}
Line {
SrcBlock "Kd2"
SrcPort 1
Points [165, 0]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
Points [40, 0; 0, 45]
DstBlock "Scope1"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
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, -30]
DstBlock "Sum2"
DstPort 3
}
Line {
SrcBlock "Step noise1"
SrcPort 1
DstBlock "Sum2"
DstPort 2
}
Line {
SrcBlock "Step noise"
SrcPort 1
Points [34, 0]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "MATLAB Fcn"
SrcPort 1
Points [20, 0; 0, 70; -100, 0]
Branch {
Points [0, -25]
DstBlock "To Workspace1"
DstPort 1
}
Branch {
Points [-85, 0]
Branch {
Points [-50, 0]
Branch {
Points [0, -130]
DstBlock "Mux"
DstPort 2
}
Branch {
Points [-55, 0]
Branch {
Points [-65, 0; 0, -30]
Branch {
DstBlock "Sum1"
DstPort 2
}
Branch {
Points [40, 0]
DstBlock "Discrete PID\nSubsystem"
DstPort 2
}
}
Branch {
Points [0, 105]
DstBlock "S-Function"
DstPort 2
}
}
}
Branch {
DstBlock "out"
DstPort 1
}
}
}
Line {
SrcBlock "S-Function"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Scope2"
DstPort 1
}
Branch {
Points [0, 30]
DstBlock "To Workspace3"
DstPort 1
}
}
Annotation {
Position [91, 32]
Text "motorold.mdl. 8/22/2001.\nPenChen Chou,"
}
Annotation {
Position [294, 218]
Text "Noise input line"
}
Annotation {
Position [41, 120]
Text "1000 counts"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -