📄 c8mrbf.mdl
字号:
MaskVisibilityString "on,on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,"
MaskVariables "xite=@1;alfa=@2;beta0=@3;n_node=@4;U_m=@5;T=@6;"
"K_pid=@7;eta_pid=@8;w0=@9;"
MaskInitialization "if length(eta_pid)==1, eta_pid=eta_pid*[1;1;1];"
" end\neta_pid=eta_pid(:);\nK_pid=K_pid(:);\nif length(w0)==1, w0=w0*[1;1;1]; "
"end\n"
MaskDisplay "disp('RBF PID\\nController')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.25|0.05|0.01|6|10|0.001|[0.03; 0.01; 0.03]|[0"
".2;0.2;0.2]|[30 40 10]"
MaskTabNameString ",,,,,,,,"
System {
Name "RBF Adaptive\nPID Controller"
Location [257, 94, 1018, 548]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "e(k)"
Position [25, 103, 55, 117]
ShowName off
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "y(k)"
Position [30, 153, 60, 167]
ShowName off
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType UnitDelay
Name "Delay"
Position [85, 91, 110, 129]
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay1"
Position [160, 92, 185, 128]
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay2"
Position [510, 314, 540, 356]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay3"
Position [231, 190, 259, 230]
Orientation "up"
NamePlacement "alternate"
ShowName off
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay4"
Position [345, 259, 375, 301]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay5"
Position [280, 261, 310, 299]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay6"
Position [455, 219, 485, 261]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Delay7"
Position [135, 181, 160, 219]
SampleTime "-1"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [480, 112, 485, 158]
BackgroundColor "black"
ShowName off
Outputs "[1,3,5*n_node]"
}
Block {
BlockType Mux
Name "Mux"
Ports [10, 1]
Position [370, 73, 375, 197]
ShowName off
Inputs "10"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [395, 117, 455, 153]
FunctionName "nnrbf_pid"
Parameters "T,n_node,K_pid,eta_pid,xite,alfa,beta0,w0"
}
Block {
BlockType Saturate
Name "Saturation"
Position [540, 98, 585, 142]
UpperLimit "U_m"
LowerLimit "-U_m"
}
Block {
BlockType Outport
Name "u(k)"
Position [610, 113, 640, 127]
ShowName off
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "PID parameters"
Position [610, 183, 640, 197]
ShowName off
Port "2"
IconDisplay "Port number"
}
Line {
SrcBlock "Delay7"
SrcPort 1
Points [45, 0; 0, -70]
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "Delay6"
SrcPort 1
Points [-100, 0; 0, -60]
DstBlock "Mux"
DstPort 10
}
Line {
SrcBlock "Delay3"
SrcPort 1
Points [0, -35]
DstBlock "Mux"
DstPort 7
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [20, 0; 0, 130]
DstBlock "Delay4"
DstPort 1
}
Line {
SrcBlock "Delay4"
SrcPort 1
Points [-10, 0]
Branch {
Points [0, -110]
DstBlock "Mux"
DstPort 9
}
Branch {
DstBlock "Delay5"
DstPort 1
}
}
Line {
SrcBlock "Delay2"
SrcPort 1
Points [-285, 0; 0, -195]
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "Delay1"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [35, 0; 0, 55]
Branch {
Points [0, 50]
DstBlock "Delay6"
DstPort 1
}
Branch {
DstBlock "PID parameters"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Saturation"
DstPort 1
}
Line {
Labels [0, 0]
SrcBlock "y(k)"
SrcPort 1
Points [10, 0]
Branch {
Points [0, 40]
DstBlock "Delay7"
DstPort 1
}
Branch {
Points [125, 0; 0, -40]
DstBlock "Mux"
DstPort 4
}
}
Line {
SrcBlock "e(k)"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -55; 280, 0; 0, 35]
DstBlock "Mux"
DstPort 1
}
Branch {
DstBlock "Delay"
DstPort 1
}
}
Line {
SrcBlock "Saturation"
SrcPort 1
Points [5, 0]
Branch {
Points [0, 215]
DstBlock "Delay2"
DstPort 1
}
Branch {
DstBlock "u(k)"
DstPort 1
}
}
Line {
SrcBlock "S-Function"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Delay"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Delay1"
DstPort 1
}
Branch {
Points [0, -30; 190, 0; 0, 20]
DstBlock "Mux"
DstPort 2
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "S-Function"
DstPort 1
}
Line {
SrcBlock "Delay5"
SrcPort 1
Points [-5, 0]
Branch {
Points [0, -120]
DstBlock "Mux"
DstPort 8
}
Branch {
Points [-25, 0]
DstBlock "Delay3"
DstPort 1
}
}
}
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [410, 104, 440, 136]
FontName "Times New Roman"
FontSize 14
Location [71, 221, 395, 460]
Open on
NumInputPorts "1"
ZoomMode "yonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "0.8"
YMin "-1"
YMax "1"
SaveToWorkspace on
SaveName "yy"
DataFormat "Array"
LimitDataPoints off
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [300, 59, 330, 91]
FontName "Times New Roman"
FontSize 14
Location [83, 363, 407, 602]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "0.8"
YMin "0"
YMax "0.2"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [155, 120, 175, 140]
ShowName off
FontName "Times New Roman"
FontSize 14
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Line {
SrcBlock "RBF Adaptive\nPID Controller"
SrcPort 1
DstBlock "Nonlinear\nPlant Model"
DstPort 1
}
Line {
SrcBlock "Multi-step\nsignal generator"
SrcPort 1
Points [5, 0]
Branch {
Points [0, -85; 235, 0]
DstBlock "Mux"
DstPort 1
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "Nonlinear\nPlant Model"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Mux"
DstPort 2
}
Branch {
Points [0, 85; -205, 0; 0, -55]
Branch {
DstBlock "Sum"
DstPort 2
}
Branch {
DstBlock "RBF Adaptive\nPID Controller"
DstPort 2
}
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Scope"
DstPort 1
}
Line {
SrcBlock "RBF Adaptive\nPID Controller"
SrcPort 2
Points [10, 0; 0, -85]
DstBlock "Scope1"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "RBF Adaptive\nPID Controller"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -