📄 predball.mdl
字号:
# $Revision: 1.1.2.1 $
Model {
Name "predball"
Version 5.0
SaveDefaultBlockParams on
SampleTimeColors off
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions off
ShowPortDataTypes off
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ExecutionOrder off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip on
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
Created "Fri Oct 16 21:07:47 1998"
Creator "eyarrow"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "eyarrow"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Tue Jul 30 11:33:54 2002"
ModelVersionFormat "1.%<AutoIncrement:174>"
ConfigurationManager "none"
SimParamPage "Solver"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
ExtModeMexFile "ext_comm"
ExtModeBatchMode off
ExtModeTrigType "manual"
ExtModeTrigMode "oneshot"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect off
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
TunableVars "prueba"
TunableVarsStorageClass "Auto"
BufferReuse on
RTWExpressionDepthLimit 5
SimulationMode "normal"
Solver "ode5"
SolverMode "SingleTasking"
StartTime "0.0"
StopTime "30"
MaxOrder 5
MaxStep "auto"
MinStep "auto"
MaxNumMinSteps "-1"
InitialStep "auto"
FixedStep "0.01"
RelTol "1e-3"
AbsTol "1e-6"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
LoadExternalInput off
ExternalInput "[t, u]"
LoadInitialState off
InitialState "xInitial"
SaveTime on
TimeSaveName "tout"
SaveState off
StateSaveName "xout"
SaveOutput off
OutputSaveName "yout"
SaveFinalState off
FinalStateName "xFinal"
SaveFormat "Array"
Decimation "1"
LimitDataPoints off
MaxDataPoints "1000"
SignalLoggingName "sigsOut"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
AlgebraicLoopMsg "warning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
CheckForMatrixSingularity "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SfunCompatibilityCheckMsg "none"
RTWInlineParameters off
BlockReductionOpt on
BooleanDataType off
ConditionallyExecuteInputs on
ParameterPooling on
OptimizeBlockIOStorage on
ZeroCross on
AssertionControl "UseLocalSettings"
ProdHWDeviceType "Microprocessor"
ProdHWWordLengths "8,16,32,32"
RTWSystemTargetFile "grt.tlc"
RTWTemplateMakefile "grt_vc.tmf"
RTWMakeCommand "make_rtw"
RTWGenerateCodeOnly off
RTWRetainRTWFile off
TLCProfiler off
TLCDebug off
TLCCoverage off
TLCAssertion off
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 Constant
Value "1"
VectorParams1D on
ShowAdditionalParam off
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
}
Block {
BlockType DiscreteStateSpace
A "1"
B "1"
C "1"
D "1"
X0 "0"
SampleTime "1"
Realization "auto"
RTWStateStorageClass "Auto"
}
Block {
BlockType Fcn
Expr "sin(u[1])"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ShowAdditionalParam off
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Inport
Port "1"
PortDimensions "-1"
SampleTime "-1"
ShowAdditionalParam off
LatchInput off
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
Interpolate on
}
Block {
BlockType Integrator
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "0"
LimitOutput off
UpperSaturationLimit "inf"
LowerSaturationLimit "-inf"
ShowSaturationPort off
ShowStatePort off
AbsoluteTolerance "auto"
ZeroCross on
}
Block {
BlockType Math
Operator "exp"
OutputSignalType "auto"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
}
Block {
BlockType Outport
Port "1"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Reference
}
Block {
BlockType "S-Function"
FunctionName "system"
PortCounts "[]"
SFunctionModules "''"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
RTWSystemCode "Auto"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
ShowAdditionalParam off
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
}
Block {
BlockType UniformRandomNumber
Minimum "-1"
Maximum "1"
Seed "0"
SampleTime "-1"
VectorParams1D on
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
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 "predball"
Location [117, 234, 1009, 626]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Clock
Name "Clock"
Position [720, 40, 740, 60]
Decimation "10"
}
Block {
BlockType SubSystem
Name "NN Predictive Controller"
Ports [2, 1]
Position [305, 50, 470, 185]
BackgroundColor "cyan"
DropShadow on
NamePlacement "alternate"
OpenFcn "nncontrolutil('nnpredict','',gcbh,gcb);"
TreatAsAtomicUnit off
MaskType "NN Predictive Controller"
MaskDescription "NN Predictive Controller. You first train a ne"
"ural network model of the plant to be controlled. The controller uses the pl"
"ant model to predict plant performance over a specified time horizon. An opt"
"imization algorithm determines the control signal that optimizes plant perfor"
"mance over this horizon. Double click the NN Predictive Controller block to "
"train the plant model and set the controller parameters."
MaskPromptString "N2|Nu|Sample time|rho (typically = 0.03)|alpha "
"(typically = 0.001)|Minimization rutine|maxiter|S1|Ni|Nj|sim_file|Training fu"
"nction|Use_Validation|Use_Testing|max_i|min_i|sam_training|epochs|minp|maxp|m"
"int|maxt|Normalize|IW|LW1_2|LW2_1|B1|B2|max_i_int|min_i_int|limit_output|max_"
"output|min_output|Use_Previous_Weights"
MaskStyleString "edit,edit,edit,edit,edit,popup(csrchgol|csrchba"
"c|csrchhyb|csrchbre|csrchcha),edit,edit,edit,edit,edit,popup(trainbfg|trainbr"
" |traincgb|traincgf|traincgp|traingd|traingdm|traingda|traingdx|trainlm |trai"
"noss|trainrp |trainscg),edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edi"
"t,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskCallbackString "|||||||||||||||||||||||||||||||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
",on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
MaskVariables "N2=@1;Nu=@2;Ts=@3;rho=@4;alpha=@5;csrchfun=@6;m"
"axiter=@7;S1=@8;Ni=@9;Nj=@10;sim_file=&11;trainfun=@12;Use_validation=@13;Use"
"_Testing=@14;max_i=@15;min_i=@16;sam_training=@17;epochs=@18;minp=@19;maxp=@2"
"0;mint=@21;maxt=@22;Normalize=@23;IW=@24;LW1_2=@25;LW2_1=@26;B1=@27;B2=@28;ma"
"x_i_int=@29;min_i_int=@30;limit_output=@31;max_output=@32;min_output=@33;Use_"
"Previous_Weights=@34;"
MaskInitialization "xl = [0 .53 .53 .85 .85 .53 .53 Na"
"N .85 .92 .92];\nyl = [.95 .95 1.05 1.05 .82 .82 .95 NaN .95 .95 .65]"
";\nx2 = [0 .53 NaN .92 1.2 NaN .53 .85 .85 .53 .53 ];\ny2 = [.39 .39 NaN"
" .65 .65 NaN .59 .59 .29 .29 .59];\nx3 = [.67 .67 NaN .64 .67 .70 NaN .53 .4"
" .4 .53 NaN .46 .53 .46];\ny3 = [.59 .82 NaN .66 .59 .66 NaN .55 .55 .86 "
".86 NaN .89 .86 .83];\n\nx1t=.03; y1t=.31;\nx2t=.03; y2t=.8;\nx8t=.03;y8t=.2"
"1;\nx3t=.77; y3t=.53;\nx4t=.77; y4t=.44;\nx5t=.45; y5t=.76;\nx6t=.45; y6t=.35"
";\nx7t=.45; y7t=.25;\n"
MaskDisplay "plot([[xl NaN x2]*.9-.075 ], [[yl NaN y2]*.9-."
"1 ]);\nplot([[x3]*.9-.075 ], [[y3]*.9-.1 ]);\ntext(x1t,y1t,'Plant');\ntext(x8"
"t,y8t,'Output');\ntext(x2t,y2t,'Reference');\ntext(x3t,y3t,'Control');\ntext("
"x4t,y4t,'Signal');\ntext(x5t,y5t,'Optim.');\ntext(x6t,y6t,'NN');\ntext(x7t,y7"
"t,'Model');\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "9|2|0.01|0.005|0.001|csrchcha|2|9|3|2|ballrepel"
"0|trainlm |1|0|4|0|10000|200|0.013569924065719701|3.9919475548539087|0.5|4.85"
"53071923405362|0|[6.0992684989626964 -3.4057613377021299 2.8284879191363013;0"
".0031446091662587555 -0.0023677675323538839 -0.00062304892754021766;0.0992663"
"19350885812 0.048519647269651175 0.0025055386954869144;-0.0013445676464647707"
" 0.00036889386984801059 -0.0030159166450831622;-1.0434582922964253 0.79109864"
"730204449 0.91872153700183812;-0.00015255877173089871 0.00027144459111970941 "
"0.0046690325671030018;0.4112390191083391 -0.99610766853970367 0.1043238816871"
"2149;-0.0094043572120226532 0.009710698502654342 -0.011307214003015112;-0.000"
"32389016715114803 2.9262252362741224e-005 -0.0011856877339459133]|[-0.7550466"
"3599627042 -0.40548770125984618;-0.91833066581615452 0.44462380813577707;-0.4"
"9150839323020501 0.25765411048438924;-0.11269530512343538 -0.1815083473533082"
"9;-0.33415698287239015 1.9376241402885785;-0.056845296032828375 0.38719752449"
"976191;2.7052303570785732 -0.10850668752945752;-0.18472905081024196 -0.562543"
"13245107257;0.36745424539455768 -0.27151820645760749]|[-3.8454064803760212e-0"
"05 -1.0968850223149691 0.042826646017039456 -1.3151930617096832 -0.0002772064"
"774394286 0.90141889537625086 -0.00276713044738676 -0.20145780532088417 5.313"
"108837236447]|[2.1551700251490771;3.8509781495954791;-1.1007432449457728;1.47"
"56440925383119;-2.9390167747519924;-0.41202014072175058;-0.47348766006921089;"
"-0.12792175043576609;-0.068227544760648864]|3.0056846398281221|0.3|0.01|1|Inf"
"|0|1"
Port {
PortNumber 1
Name "Current"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
System {
Name "NN Predictive Controller"
Location [478, 121, 887, 511]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "Reference"
Position [105, 85, 135, 100]
Orientation "down"
NamePlacement "alternate"
}
Block {
BlockType Inport
Name "Plant output"
Position [160, 355, 190, 370]
Orientation "up"
Port "2"
}
Block {
BlockType Mux
Name "Mux"
Ports [4, 1]
Position [103, 135, 242, 190]
Orientation "down"
NamePlacement "alternate"
ShowName off
DisplayOption "signals"
}
Block {
BlockType SubSystem
Name "NN model"
Ports [2, 2]
Position [210, 274, 280, 316]
TreatAsAtomicUnit off
System {
Name "NN model"
Location [43, 213, 1011, 586]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "u"
Position [75, 223, 105, 237]
}
Block {
BlockType Inport
Name "y"
Position [25, 78, 55, 92]
Port "2"
}
Block {
BlockType Constant
Name "Constant"
Position [395, 280, 415, 300]
Value "B1"
}
Block {
BlockType Constant
Name "Constant1"
Position [565, 290, 585, 310]
Value "B2"
}
Block {
BlockType Constant
Name "Constant2"
Position [135, 270, 155, 290]
Value "Normalize"
}
Block {
BlockType Constant
Name "Constant3"
Position [105, 145, 125, 165]
Value "Normalize"
}
Block {
BlockType Constant
Name "Constant4"
Position [780, 255, 800, 275]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -