⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 narmamaglev.mdl

📁 神经网络预测控制程序的源代码
💻 MDL
📖 第 1 页 / 共 4 页
字号:
# $Revision: 1.5.2.1 $
Model {
  Name			  "narmamaglev"
  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  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Fri Oct 16 21:07:47 1998"
  Creator		  "munlock -all d:\\work\\myr12\\toolbox\\fuzzy\\fuzzy"
"\\mfedit.m"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "eyarrow"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Tue Jul 30 11:33:21 2002"
  ModelVersionFormat	  "1.%<AutoIncrement:210>"
  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		  "ode45"
  SolverMode		  "SingleTasking"
  StartTime		  "0.0"
  StopTime		  "30"
  MaxOrder		  5
  MaxStep		  "auto"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "auto"
  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		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      PortCounts	      "[]"
      SFunctionModules	      "''"
    }
    Block {
      BlockType		      Signum
      ZeroCross		      on
    }
    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"
    }
    Block {
      BlockType		      ZeroOrderHold
      SampleTime	      "1"
    }
  }
  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		    "narmamaglev"
    Location		    [139, 115, 900, 415]
    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		      [620, 45, 640, 65]
      Decimation	      "10"
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info"
      Ports		      []
      Position		      [410, 225, 437, 250]
      DropShadow	      on
      ShowName		      off
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('?')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info"
	Location		[617, 380, 965, 563]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "This system simulates NARMA-L2 control\nof "
"a magnet suspended by an electromagnet."
	  Position		  [162, 22]
	}
	Annotation {
	  Name			  "Double-click on the NARMA-L2 Controller blo"
"ck\nto train the neural network controller and plant model."
	  Position		  [162, 67]
	}
	Annotation {
	  Name			  "For more information on what the controller"
" \ndoes, look under the mask of the NARMA-L2 \nController block."
	  Position		  [162, 122]
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info2"
      Ports		      []
      Position		      [560, 220, 662, 271]
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "simcad(bdroot)"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('Double click\\nhere for\\nSimulink Help')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info2"
	Location		[128, 280, 487, 453]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "NARMA-L2 Controller"
      Ports		      [2, 1]
      Position		      [215, 25, 375, 160]
      BackgroundColor	      "cyan"
      DropShadow	      on
      NamePlacement	      "alternate"
      OpenFcn		      "nncontrolutil('nnident','',gcbh,gcb,'narma_l2')"
";"
      TreatAsAtomicUnit	      off
      MaskType		      "NARMA-L2 Controller"
      MaskDescription	      "NARMA-L2 Controller. You first train a neural n"
"etwork model of the plant to be controlled.  The controller is a rearrangemen"
"t of the trained plant model.  Double-click the NARMA-L2 Controller block to "
"begin the plant training."
      MaskPromptString	      "Sample time|S1|Ni|Nj|sim_file|Training function"
"|Use_Validation|Use_Testing|max_i|min_i|max_i_int|min_i_int|sam_training|epoc"
"hs|minp|maxp|mint|maxt|Normalize|IW1_1|IW3_2|IW5_3|LW2_1|LW4_3|LW5_4|LW6_5|LW"
"6_2|B1|B2|B3|B4|Limit_output|min_output|max_output|Use_Previous_Weights"
      MaskStyleString	      "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,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,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,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,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,on"
      MaskVarAliasString      ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
      MaskVariables	      "Ts=@1;S1=@2;Ni=@3;Nj=@4;sim_file=&5;trainfun=@6"
";Use_validation=@7;Use_Testing=@8;max_i=@9;min_i=@10;max_i_int=@11;min_i_int="
"@12;sam_training=@13;epochs=@14;minp=@15;maxp=@16;mint=@17;maxt=@18;Normalize"
"=@19;IW1_1=@20;IW3_2=@21;IW5_3=@22;LW2_1=@23;LW4_3=@24;LW5_4=@25;LW6_5=@26;LW"
"6_2=@27;B1=@28;B2=@29;B3=@30;B4=@31;Limit_output=@32;min_output=@33;max_outpu"
"t=@34;Use_Previous_Weights=@35;"
      MaskInitialization      "xl = [0    .4   NaN  .33  .55   .55  .33  .33  "
"NaN .80  .92 .92];\nyl = [.95 .95 NaN  .75  .75   .55  .55  .75  NaN  .95 .95"
" .65];\nx2 = [0    .43 NaN .45 .45    NaN .92 1.2 NaN .63 .85 .85 .63 .63 ];"
"\ny2 = [.39 .39 NaN  .41 .55   NaN .65 .65 NaN .75 .75  .55  .55  .75];\nx3 ="
" [.45 .45 NaN .42 .45 .48  NaN .33 .4 .33];\ny3 = [.75 .90 NaN .83 .90 .83  N"
"aN  .98 .95 .92];\nx4 = [.75 .75 NaN .72 .75 .78  NaN  .5 .7 NaN .63 .7 .63];"
"\ny4 = [.75 .90 NaN .83 .90 .83  NaN .95 .95 NaN .98 .95 .92];\nx5 = [.43 .43"
" .77 .77 .43 NaN .36 .43 .36 NaN .75 .75];\ny5 = [.37 .41 .41 .37 .37 NaN .42"
" .39 .36 NaN .41 .55];\nx6 = [.92 .92 .77 NaN .84 .77 .84];\ny6 = [.65 .39 .3"
"9 NaN .42 .39 .36];\nx1t=.03; y1t=.31;\nx2t=.03; y2t=.85;\nx8t=.03;y8t=.21;\n"
"x3t=.77; y3t=.53;\nx4t=.77; y4t=.44;\nx5t=.34; y5t=.49;\nx6t=.58; y6t=.49;\n"
"\n\nt=(0:24)/24*2*pi;\nxs = .05*cos(t);\nys = .05*sin(t);\nxs1=xs+.45;\nys1=y"
"s+.95;\nxs2=xs+.75;\nys2=ys+.95;"
      MaskDisplay	      "plot([[xl NaN x2]*.9-.075 ], [[yl  NaN y2]*.9-."
"1 ]);\nplot([[x3 NaN xs1 NaN xs2]*.9-.075 ], [[y3 NaN ys1 NaN ys2]*.9-.1 ]);"
"\nplot([x4 NaN x5]*.9-.075,[y4 NaN y5]*.9-.1);\nplot([x6 NaN ]*.9-.075,[y6 Na"
"N ]*.9-.1);\ntext(x1t,y1t,'Plant');\ntext(x8t,y8t,'Output');\ntext(x2t,y2t,'R"
"eference');\ntext(x3t,y3t,'Control');\ntext(x4t,y4t,'Signal');\ntext(x5t,y5t,"
"'f');\ntext(x6t,y6t,'g');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "0.01|9|3|2|ballrepel0|trainlm |1|1|4|-1|1|0.1|1"
"0000|100|-0.98589809892637514|3.9504698574991721|-0.0016503994509919615|5.848"
"3552223055346|1|[2.8589406503354526 3.8571763260787164 2.4456184377322217 0.8"
"666607644547214;0.84908220491155217 -0.74479667271080674 0.17438611819566038 "
"-0.054598878873029347;-0.62709936825321444 -1.3691145688669635 -1.03543493213"
"63878 -2.2482593652050578;-0.61112872012274111 3.6328637614421511 -2.98192247"
"41551729 3.7430014139229799;8.2151216183173048 -0.34864518388745791 -0.638982"
"45756720395 3.2213765524683398;-0.62348046801820789 1.6654556537092802 -0.621"
"94271006861923 0.21912328150625099;0.14622178875562497 0.092672072012439946 -"
"2.0000544306046777 -1.7404534095664805;-0.016488785105071693 0.16978381724998"
"215 -0.084822329865259866 0.026867941830282197;1.9174811964991516 -1.69491959"
"23894798 0.35217636039029204 -0.12168945961699514]|[2.0947814145837365 4.1399"
"235297823935 0.45973664424051686 1.4201813933844121;-0.86879079197788289 -0.9"
"1114493693130993 -1.7736957440317072 -1.8251383343645129;-1.5220230282736409 "
"-1.9645557493380605 -0.13454356275803814 0.69198422228505774;1.10492075650723"
"56 1.1058960542907463 -1.644921307204396 -0.10202375847256849;1.7626417259934"
"55 0.12377706028660714 -0.7437018195796895 1.3293490471370206;1.3902743881456"
"05 1.2487181342609894 0.59892762333675664 1.8687582044711111;-1.2477149308688"
"809 -0.79236132307758722 0.36202987325836317 -2.3538403428029064;-1.795434452"
"809733 0.33077476751858431 1.195152886823688 -0.75536654530187719;1.595894492"
"3973373 -0.67233970442189994 2.0385698345589716 1.2983707063666041]|-0.861302"
"22828051506|[0.00015172623864271055 2.2013108252986395 -0.0004194379342446681"
"1 -0.0003479657571070474 -4.886121844237561e-005 0.048716164660783372 0.00018"
"521862399574861 4.7909859890519924 0.47215204119265081]|[1.1881559217746376 1"
".4377070715786655 -0.90278040876764909 -2.3370997753198059 -0.097223533841072"
"435 -0.63741922080667701 -2.7337228147947257 3.0132329690414466 2.17298689321"
"732]|0.599679883882549|0.00053164383570330738|1.015263173451765|[-2.050920521"
"9588469;-0.31031398693333401;-1.4045705779285507;0.015391387074643211;-3.2845"
"781323270051;1.1180253626502208;2.2612148765562523;-0.13759375641734173;1.101"
"0317884774456]|0.89897272661230299|[-1.002095836800059;-1.126799288887316;1.0"
"075534076876089;3.6052646447174865;-0.024716746631406297;1.2795222700572257;-"
"2.288460695586839;-3.073994760224549;1.7909749466641665]|0.8642380934413868|1"
"|0|Inf|1"
      Port {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -