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

📄 predcstr.mdl

📁 神经网络预测控制程序的源代码
💻 MDL
📖 第 1 页 / 共 4 页
字号:
      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	      "7|2|0.2|0.05|0.001|csrchbac|2|7|2|2|cstr|trainl"
"m |1|0|4|0|8000|200|0.02233575679015197|3.977181962055679|19.990542740630676|"
"23.003707300214998|0|[-20.531997924598212 18.706482494882994;0.00416814879317"
"33516 -0.003898180117493663;0.0027271331329927679 -0.0026383962298670975;-4.2"
"884263047654887 -2.5242458681173563;-7.5376751481296909 11.798966620249038;0."
"12631450792955951 0.63090781487873226;-9.0327138502332947 3.9557193990027328]"
"|[14.94314250694182 -17.959099344431603;-0.81834808440118445 0.41655850750692"
"763;0.364433114947604 -0.17752308649608817;55.505918973874849 -51.27199648544"
"6365;-3.4857289415608221 2.5155674023943493;-1.0383681172774319 -0.1649807357"
"299794;-1.7354318305331962 4.1593615744767991]|[0.0026508898559841616 -1.0458"
"797145936556 5.0292698388067745 0.00010141072535827776 0.0032962551987542432 "
"0.58061299674354561 8.9082702971420182e-005]|[18.565258582766731;9.6542761594"
"756836;-3.6577882481482806;-67.658021555936102;-2.7052627837062393;0.46399572"
"090641622;-40.321245764315009]|21.149686119715415|20|5|1|23|20|1"
      Port {
	PortNumber		1
	Name			"Flow Rate"
	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]
	      Value		      "Normalize"
	    }
	    Block {
	      BlockType		      DiscreteStateSpace
	      Name		      "Discrete State-Space1"
	      Position		      [255, 211, 365, 249]
	      A			      "[0 zeros(1,Ni-2);eye(Ni-2,Ni-1)]"
	      B			      "[zeros(double(Ni==1));eye(Ni-1,1)]"
	      C			      "[0 zeros(1,Ni-2);eye(Ni-1,Ni-1)]"
	      D			      "eye(Ni,1)"
	      SampleTime	      "Ts"
	    }
	    Block {
	      BlockType		      DiscreteStateSpace
	      Name		      "Discrete State-Space2"
	      Position		      [260, 66, 370, 104]
	      A			      "[0 zeros(1,Nj-2);eye(Nj-2,Nj-1)]"
	      B			      "[zeros(double(Nj==1));eye(Nj-1,1)]"
	      C			      "[0 zeros(1,Nj-2);eye(Nj-1,Nj-1)]"
	      D			      "eye(Nj,1) "
	      SampleTime	      "Ts"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn"
	      Position		      [135, 220, 170, 250]
	      Expr		      "(u(1)-minp)*2/(maxp-minp) - 1"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn1"
	      Position		      [95, 70, 130, 100]
	      Expr		      "(u(1)-mint)*2/(maxt-mint) - 1"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn2"
	      Position		      [710, 225, 745, 255]
	      Expr		      "(maxt-mint)*(u(1)+1)/2 + mint"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Matrix\nGain"
	      Position		      [395, 215, 425, 245]
	      Gain		      "IW"
	      Multiplication	      "Matrix(K*u)"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Matrix\nGain1"
	      Position		      [390, 70, 420, 100]
	      Gain		      "LW1_2"
	      Multiplication	      "Matrix(K*u)"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Matrix\nGain2"
	      Position		      [560, 215, 590, 245]
	      Gain		      "LW2_1"
	      Multiplication	      "Matrix(K*u)"
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch"
	      Position		      [200, 270, 230, 300]
	      Threshold		      "0.5"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch1"
	      Position		      [160, 145, 190, 175]
	      Threshold		      "0.5"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch2"
	      Position		      [835, 255, 865, 285]
	      Threshold		      "0.5"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay1"
	      Position		      [210, 70, 240, 100]
	      SampleTime	      "Ts"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "netsum"
	      Ports		      [3, 1]
	      Position		      [450, 209, 475, 251]
	      TreatAsAtomicUnit	      off
	      MaskDisplay	      "disp('+')"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      System {
		Name			"netsum"
		Location		[320, 85, 820, 386]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [20, 50, 40, 70]
		}
		Block {
		  BlockType		  Inport
		  Name			  "In2"
		  Position		  [20, 90, 40, 110]
		  Port			  "2"
		}
		Block {
		  BlockType		  Inport
		  Name			  "In3"
		  Position		  [20, 130, 40, 150]
		  Port			  "3"
		}
		Block {
		  BlockType		  Sum
		  Name			  "netsum"
		  Ports			  [3, 1]
		  Position		  [90, 59, 115, 101]
		  Inputs		  "3"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [145, 80, 165, 100]
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "netsum"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In2"
		  SrcPort		  1
		  DstBlock		  "netsum"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "In3"
		  SrcPort		  1
		  DstBlock		  "netsum"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "netsum"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "netsum1"
	      Ports		      [2, 1]
	      Position		      [620, 220, 645, 255]
	      TreatAsAtomicUnit	      off
	      MaskDisplay	      "disp('+')"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      System {
		Name			"netsum1"
		Location		[320, 85, 820, 386]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [20, 65, 40, 85]
		}
		Block {
		  BlockType		  Inport
		  Name			  "In2"
		  Position		  [20, 105, 40, 125]
		  Port			  "2"
		}
		Block {
		  BlockType		  Sum
		  Name			  "netsum1"
		  Ports			  [2, 1]
		  Position		  [90, 60, 115, 95]
		  Inputs		  "2"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [145, 80, 165, 100]
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "netsum1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In2"
		  SrcPort		  1
		  DstBlock		  "netsum1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "netsum1"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "purelin"
	      Ports		      [1, 1]
	      Position		      [660, 228, 685, 252]
	      TreatAsAtomicUnit	      off
	      MaskDisplay	      "plot([-1 1],[0 0],[-1 1],[-1 1])"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      System {
		Name			"purelin"
		Location		[144, 218, 404, 300]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "n"
		  Position		  [25, 33, 55, 47]
		}
		Block {
		  BlockType		  Outport
		  Name			  "a"
		  Position		  [205, 33, 235, 47]
		}
		Line {
		  SrcBlock		  "n"
		  SrcPort		  1
		  DstBlock		  "a"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "tansig"
	      Ports		      [1, 1]
	      Position		      [500, 218, 525, 242]
	      TreatAsAtomicUnit	      off
	      MaskDisplay	      "plot([-1 1],[0 0],[-1 -.9 -.8 -.7 -.6 -"
".5 -.4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1],2./(1+exp(-8*[-1 -.9 -.8 -"
".7 -.6 -.5 -.4 -.3 -.2 -.1 0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1]))-1)"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      System {
		Name			"tansig"
		Location		[0, 38, 640, 480]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "n"
		  Position		  [25, 33, 55, 47]
		}
		Block {
		  BlockType		  Math
		  Name			  "Exp"
		  Ports			  [1, 1]
		  Position		  [155, 25, 185, 55]
		  MaskIconFrame		  on
		  MaskIconOpaque	  on
		  MaskIconRotate	  "none"

⌨️ 快捷键说明

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