📄 c8bp_pid.mdl
字号:
CurrentDlgPage "Solver"
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Clock
DisplayTime off
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType Fcn
Expr "sin(u[1])"
SampleTime "-1"
}
Block {
BlockType Inport
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Scope
Floating off
ModelBased off
TickLabels "OneTimeTick"
ZoomMode "on"
Grid "on"
TimeRange "auto"
YMin "-5"
YMax "5"
SaveToWorkspace off
SaveName "ScopeData"
LimitDataPoints on
MaxDataPoints "5000"
Decimation "1"
SampleInput off
SampleTime "0"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Helvetica"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Helvetica"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "c8bp_pid"
Location [437, 360, 1017, 653]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType "S-Function"
Name "Multi-step\nsignal generator"
Ports [0, 1]
Position [40, 108, 125, 162]
FontName "Times New Roman"
FontSize 14
FunctionName "multi_step"
Parameters "tTime,yStep"
MaskPromptString "Time instances|Step Values"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "tTime=@1;yStep=@2;"
MaskInitialization "xx=repmat(tTime,2,1); yy=repmat(yStep,2,1);\nxx"
"=[xx(:)' 2*tTime(end)-tTime(end-1)];\nyy=[0, yy(:)'];\n"
MaskDisplay "plot(xx,yy)"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[0,1,2 3 4,6 7]*0.1|[-1,3,-2 1 2,5 -3]"
MaskTabNameString ","
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [420, 106, 425, 144]
ShowName off
FontName "Times New Roman"
FontSize 14
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Neuralnet PID Controller\nwith BP training"
Ports [2, 2]
Position [160, 121, 270, 174]
FontName "Times New Roman"
FontSize 14
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskPromptString "The value of xite|The value of alfa|number of "
"hidden layer nodes|Actuator Limit U_m|Sampling period|Hidden Layer Trans Func"
"tion|Output layer trans function"
MaskStyleString "edit,edit,edit,edit,edit,popup(sigmoid|log-sigm"
"oid),popup(sigmoid|log-simoid)"
MaskTunableValueString "on,on,on,on,on,on,on"
MaskCallbackString "||||||"
MaskEnableString "on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,"
MaskVariables "xite=@1;alfa=@2;n_hidden=@3;U_m=@4;T=@5;kFunc1="
"@6;kFunc2=@7;"
MaskDisplay "disp('BP PID Controller')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.25|0.05|5|10|0.001|log-sigmoid|log-simoid"
MaskTabNameString ",,,,,,"
System {
Name "Neuralnet PID Controller\nwith BP training"
Location [257, 94, 922, 388]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "r(k)"
Position [15, 108, 45, 122]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Inport
Name "y(k)"
Position [70, 153, 100, 167]
Port "2"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [525, 111, 530, 149]
BackgroundColor "black"
ShowName off
Outputs "[1,3,7*n_hidden]"
}
Block {
BlockType Mux
Name "Mux"
Ports [9, 1]
Position [395, 69, 400, 191]
ShowName off
Inputs "9"
DisplayOption "bar"
}
Block {
BlockType "S-Function"
Name "S-Function"
Ports [1, 1]
Position [435, 112, 495, 148]
FunctionName "nnbp_pid"
Parameters "T,n_hidden,xite,alfa,kFunc1,kFunc2"
}
Block {
BlockType Saturate
Name "Saturation"
Position [610, 98, 655, 142]
UpperLimit "U_m"
LowerLimit "-U_m"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [100, 105, 120, 125]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [165, 95, 190, 135]
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay1"
Position [235, 96, 260, 134]
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay2"
Position [395, 280, 430, 320]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay3"
Position [205, 171, 230, 209]
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay4"
Position [490, 215, 525, 255]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay5"
Position [415, 215, 450, 255]
Orientation "left"
SampleTime "-1"
}
Block {
BlockType Outport
Name "u(k)"
Position [720, 113, 750, 127]
IconDisplay "Port number"
}
Block {
BlockType Outport
Name "PID parameters"
Position [725, 163, 755, 177]
Port "2"
IconDisplay "Port number"
}
Line {
SrcBlock "Unit Delay5"
SrcPort 1
Points [-65, 0; 0, -60]
DstBlock "Mux"
DstPort 8
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [35, 0; 0, 95]
DstBlock "Unit Delay4"
DstPort 1
}
Line {
SrcBlock "Unit Delay4"
SrcPort 1
Points [-15, 0]
Branch {
Points [0, -30; -105, 0; 0, -15]
DstBlock "Mux"
DstPort 9
}
Branch {
DstBlock "Unit Delay5"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay2"
SrcPort 1
Points [-60, 0; 0, -140]
DstBlock "Mux"
DstPort 7
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -