📄 motorn_control.mdl
字号:
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "LW{2,1}"
Location [480, 85, 980, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "automatic"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
AutoZoom on
Block {
BlockType Inport
Name "ad{2,1}"
Position [40, 60, 60, 80]
BackgroundColor "magenta"
Port "1"
PortDimensions "7"
SampleTime "0.01"
Interpolate on
}
Block {
BlockType Constant
Name "IW{2,1}(1,:)'"
Position [140, 40, 180, 60]
BackgroundColor "lightBlue"
Value "[-2.7424205383360558;-0.812107091"
"34617598;0.58151480263510591;-1.2511386416797516;0.25740569118968093;-1.44968"
"95729116375;-13.155476042479332]"
VectorParams1D on
MaskDisplay "disp('weights')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Mux
Name "Mux"
Ports [1, 1]
Position [340, 60, 380, 80]
Inputs "1"
DisplayOption "none"
}
Block {
BlockType Reference
Name "dotprod1"
Ports [2, 1]
Position [240, 40, 260, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Weight Functions/dotprod"
SourceType ""
}
Block {
BlockType Outport
Name "lz{2,1}"
Position [420, 60, 440, 80]
BackgroundColor "magenta"
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "lz{2,1}"
DstPort 1
}
Line {
SrcBlock "dotprod1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "ad{2,1}"
SrcPort 1
DstBlock "dotprod1"
DstPort 2
}
Line {
SrcBlock "IW{2,1}(1,:)'"
SrcPort 1
DstBlock "dotprod1"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "b{2}"
Position [160, 80, 200, 100]
BackgroundColor "lightBlue"
Value "1.2937653626062164"
VectorParams1D on
MaskDisplay "disp('bias')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Sum
Name "netsum"
Ports [2, 1]
Position [240, 60, 260, 80]
BackgroundColor "lightBlue"
IconShape "rectangular"
Inputs "2"
SaturateOnIntegerOverflow on
}
Block {
BlockType Reference
Name "purelin"
Ports [1, 1]
Position [300, 60, 320, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Transfer Functions/purelin"
SourceType ""
}
Block {
BlockType Outport
Name "a{2}"
Position [360, 60, 380, 80]
BackgroundColor "magenta"
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "purelin"
SrcPort 1
DstBlock "a{2}"
DstPort 1
}
Line {
SrcBlock "netsum"
SrcPort 1
DstBlock "purelin"
DstPort 1
}
Line {
SrcBlock "b{2}"
SrcPort 1
DstBlock "netsum"
DstPort 2
}
Line {
SrcBlock "LW{2,1}"
SrcPort 1
DstBlock "netsum"
DstPort 1
}
Line {
SrcBlock "Delays 1"
SrcPort 1
DstBlock "LW{2,1}"
DstPort 1
}
Line {
SrcBlock "a{1} "
SrcPort 1
DstBlock "Delays 1"
DstPort 1
}
}
}
Block {
BlockType Goto
Name "a{1}"
Position [380, 40, 400, 60]
GotoTag "feedback1"
TagVisibility "local"
MaskDisplay "plot(cos(0:.1:2*pi),sin(0:.1:2*pi))"
MaskIconFrame off
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType Outport
Name "y{1}"
Position [380, 120, 400, 140]
BackgroundColor "magenta"
Port "1"
OutputWhenDisabled "held"
InitialOutput "0"
}
Line {
SrcBlock "Layer 2"
SrcPort 1
DstBlock "y{1}"
DstPort 1
}
Line {
SrcBlock " a{1} "
SrcPort 1
DstBlock "Layer 2"
DstPort 1
}
Line {
SrcBlock "Layer 1"
SrcPort 1
DstBlock "a{1}"
DstPort 1
}
Line {
SrcBlock "p{1}"
SrcPort 1
DstBlock "Layer 1"
DstPort 1
}
}
}
Block {
BlockType Saturate
Name "Saturation"
Position [145, 25, 175, 55]
UpperLimit "2"
LowerLimit "-2"
LinearizeAsGain on
}
Block {
BlockType Saturate
Name "Saturation1"
Position [150, 85, 180, 115]
UpperLimit "2"
LowerLimit "-2"
LinearizeAsGain on
}
Block {
BlockType Outport
Name "Out1"
Position [375, 43, 405, 57]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Neural Network"
DstPort 1
}
Line {
SrcBlock "e"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Neural Network"
SrcPort 1
DstBlock "Gain3"
DstPort 1
}
Line {
SrcBlock "ie"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Saturation"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Saturation1"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "Saturation1"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
}
}
Block {
BlockType RandomNumber
Name "Random\nNumber"
Position [20, 110, 50, 140]
Mean "0"
Variance "1"
Seed "0"
SampleTime "0"
VectorParams1D on
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [500, 35, 530, 65]
Floating off
Location [8, 65, 237, 237]
Open on
NumInputPorts "1"
TickLabels "OneTimeTick"
ZoomMode "on"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
Grid "on"
TimeRange "0.8"
YMin "0"
YMax "8"
SaveToWorkspace off
SaveName "ScopeData"
DataFormat "StructureWithTime"
LimitDataPoints on
MaxDataPoints "50000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [15, 25, 40, 55]
Time "0"
Before "0"
After "4"
SampleTime "Ts"
VectorParams1D on
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [150, 30, 170, 50]
ShowName off
IconShape "round"
Inputs "|+-"
SaturateOnIntegerOverflow on
}
Block {
BlockType ToWorkspace
Name "To Workspace\nRPM"
Position [470, 85, 490, 105]
VariableName "y"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ToWorkspace
Name "To Workspace2"
Position [380, 140, 405, 170]
VariableName "t"
MaxDataPoints "inf"
Decimation "1"
SampleTime "-1"
SaveFormat "Array"
}
Block {
BlockType ZeroOrderHold
Name "Zero-Order\nHold"
Position [315, 136, 350, 174]
SampleTime "Ts"
}
Block {
BlockType Outport
Name "Out1"
Position [235, 128, 265, 142]
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "Out2"
Position [80, 78, 110, 92]
Port "2"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "Out3"
Position [515, 148, 545, 162]
Port "3"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Outport
Name "Out4"
Position [400, 78, 430, 92]
Port "4"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Line {
SrcBlock "Clock"
SrcPort 1
DstBlock "Zero-Order\nHold"
DstPort 1
}
Line {
SrcBlock "Step"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Gain1"
DstPort 1
}
Branch {
Points [0, 45]
DstBlock "Out2"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [0, 5]
Branch {
Points [0, 30]
Branch {
DstBlock "Discrete-Time\nIntegrator"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Out1"
DstPort 1
}
}
Branch {
Points [20, 0; 0, -10]
DstBlock "NN Subsystem"
DstPort 1
}
}
Line {
SrcBlock "Discrete-Time\nIntegrator"
SrcPort 1
Points [0, -15]
DstBlock "NN Subsystem"
DstPort 2
}
Line {
SrcBlock "Gain2"
SrcPort 1
Points [130, 0]
DstBlock "Motor speed\nSubsystem"
DstPort 2
}
Line {
SrcBlock "Motor speed\nSubsystem"
SrcPort 1
Points [5, 0; 0, 25; 5, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 45]
Branch {
Points [35, 0]
DstBlock "Gain6"
DstPort 1
}
Branch {
Points [-220, 0]
DstBlock "Sum"
DstPort 2
}
}
}
Line {
SrcBlock "NN Subsystem"
SrcPort 1
DstBlock "Motor speed\nSubsystem"
DstPort 1
}
Line {
SrcBlock "Random\nNumber"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Zero-Order\nHold"
SrcPort 1
DstBlock "To Workspace2"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -25; 250, 0]
DstBlock "Mux"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Gain3"
DstPort 1
}
Line {
SrcBlock "Gain3"
SrcPort 1
Points [0, 0]
Branch {
DstBlock "Scope"
DstPort 1
}
Branch {
Points [0, 20; -30, 0]
DstBlock "To Workspace\nRPM"
DstPort 1
}
}
Line {
SrcBlock "Gain6"
SrcPort 1
DstBlock "Out3"
DstPort 1
}
Line {
SrcBlock "Motor speed\nSubsystem"
SrcPort 2
Points [0, 25]
DstBlock "Out4"
DstPort 1
}
Annotation {
Position [113, 199]
Text "Motorn_control.mdl\nPenChen Chou, Aug. 4, 2001."
"\nRun ex631conv before simulation"
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -