📄 ex33c1_pid.mdl
字号:
Block {
BlockType Mux
Name "Mux"
Ports [1, 1]
Position [340, 60, 380, 80]
Inputs "1"
}
Block {
BlockType Reference
Name "dotprod1"
Ports [2, 1]
Position [240, 40, 260, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Weight Functions/dotprod"
SourceType ""
ShowPortLabels on
}
Block {
BlockType Outport
Name "lz{2,1}"
Position [420, 60, 440, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "IW{2,1}(1,:)'"
SrcPort 1
DstBlock "dotprod1"
DstPort 1
}
Line {
SrcBlock "ad{2,1}"
SrcPort 1
DstBlock "dotprod1"
DstPort 2
}
Line {
SrcBlock "dotprod1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "lz{2,1}"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "b{2}"
Position [160, 80, 200, 100]
BackgroundColor "lightBlue"
Value "0"
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"
Inputs "2"
}
Block {
BlockType Reference
Name "purelin"
Ports [1, 1]
Position [300, 60, 320, 80]
BackgroundColor "lightBlue"
SourceBlock "neural/Transfer Functions/purelin"
SourceType ""
ShowPortLabels on
}
Block {
BlockType Outport
Name "a{2}"
Position [360, 60, 380, 80]
BackgroundColor "magenta"
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "a{1} "
SrcPort 1
DstBlock "Delays 1"
DstPort 1
}
Line {
SrcBlock "Delays 1"
SrcPort 1
DstBlock "LW{2,1}"
DstPort 1
}
Line {
SrcBlock "LW{2,1}"
SrcPort 1
DstBlock "netsum"
DstPort 1
}
Line {
SrcBlock "b{2}"
SrcPort 1
DstBlock "netsum"
DstPort 2
}
Line {
SrcBlock "netsum"
SrcPort 1
DstBlock "purelin"
DstPort 1
}
Line {
SrcBlock "purelin"
SrcPort 1
DstBlock "a{2}"
DstPort 1
}
}
}
Block {
BlockType Goto
Name "a{1}"
Position [380, 40, 400, 60]
DialogController "Simulink.DDGSource"
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"
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "p{1}"
SrcPort 1
DstBlock "Layer 1"
DstPort 1
}
Line {
SrcBlock "Layer 1"
SrcPort 1
DstBlock "a{1}"
DstPort 1
}
Line {
SrcBlock " a{1} "
SrcPort 1
DstBlock "Layer 2"
DstPort 1
}
Line {
SrcBlock "Layer 2"
SrcPort 1
DstBlock "y{1}"
DstPort 1
}
}
}
Block {
BlockType Gain
Name "SDE=0.01"
Position [150, 74, 235, 126]
Gain "SDE"
}
Block {
BlockType Gain
Name "SE=1"
Position [160, 33, 200, 67]
Gain "SE"
}
Block {
BlockType Gain
Name "SU=1"
Position [415, 58, 455, 92]
Gain "SU"
}
Block {
BlockType Outport
Name "Out1"
Position [475, 68, 505, 82]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
Points [0, 0; 15, 0]
Branch {
DstBlock "Derivative1"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "SE=1"
DstPort 1
}
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Neural Network2"
DstPort 1
}
Line {
SrcBlock "Derivative1"
SrcPort 1
DstBlock "SDE=0.01"
DstPort 1
}
Line {
SrcBlock "SU=1"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "Neural Network2"
SrcPort 1
DstBlock "SU=1"
DstPort 1
}
Line {
SrcBlock "SE=1"
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "SDE=0.01"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Annotation {
Name "HL=5"
Position [328, 130]
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [680, 104, 710, 136]
Location [6, 56, 301, 288]
Open on
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "5"
YMin "-1"
YMax "3"
SaveToWorkspace on
SaveName "Y"
DataFormat "Array"
MaxDataPoints "50000"
}
Block {
BlockType Sin
Name "Sine Wave"
Ports [0, 1]
Position [55, 85, 85, 115]
SineType "Time based"
Frequency "w"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum1"
Ports [3, 1]
Position [410, 90, 430, 110]
ShowName off
IconShape "round"
Inputs "|+++"
}
Block {
BlockType Sum
Name "Sum8"
Ports [2, 1]
Position [260, 90, 280, 110]
ShowName off
IconShape "round"
Inputs "|++"
}
Block {
BlockType TransferFcn
Name "Transfer Fcn1"
Position [510, 82, 565, 118]
BackgroundColor "green"
Numerator "[10]"
Denominator "[1 3 2]"
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [25, 0]
Branch {
Points [0, -25; 490, 0; 0, 25]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [50, 0]
Branch {
Points [0, 45]
DstBlock "Neural Subsystem1\n5 Neurons in HL\n"
DstPort 1
}
Branch {
DstBlock "Sum8"
DstPort 1
}
}
}
Line {
SrcBlock "Integrator"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Derivative"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
Points [15, 0]
DstBlock "Sum1"
DstPort 3
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [0, -18]
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Transfer Fcn1"
DstPort 1
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Transfer Fcn1"
SrcPort 1
Points [0, 35]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Sum8"
SrcPort 1
Points [10, 0]
Branch {
Points [104, 0]
DstBlock "Sum1"
DstPort 1
}
Branch {
Points [0, 30; 0, 0]
Branch {
DstBlock "Integrator"
DstPort 1
}
Branch {
DstBlock "Derivative"
DstPort 1
}
}
}
Line {
SrcBlock "Neural Subsystem1\n5 Neurons in HL\n"
SrcPort 1
Points [20, 0]
DstBlock "Sum8"
DstPort 2
}
Annotation {
Name "ex33C1_pid.mdl, 7-8-2001, 2005-6-6,\nUse of PS_"
"ex33C.m file to find PID parameters\nand Scaling factors of Assistant NN\nver"
"sion 7.x\nPenChen Chou"
Position [131, 36]
}
Annotation {
Name "\n"
Position [712, 56]
}
Annotation {
Name "Set Kp=10;Ki=0;Kd=0;SE=0;SDE=0;SU=0;\nbefore si"
"mulation.\nSee a WORD file to find the result."
Position [375, 34]
}
Annotation {
Name "NORMAL plant"
Position [534, 153]
}
Annotation {
Name "Kp=2.4074;Ki=0.2358;Kd=0.2056;\nSE=0.8199;SDE=0"
".1353;SU=0.0822;\n is a set data after PS_ex33C.m execution."
Position [599, 34]
}
Annotation {
Name "w=9. we have found that the open-loop gain is a"
"pproximatly 1,\nso the PM=9*0.01*180/pi=51.6 gegrees with a delay time of 0.0"
"1 second."
Position [224, 238]
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -