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

📄 predcstr.mdl

📁 神经网络预测控制程序的源代码
💻 MDL
📖 第 1 页 / 共 4 页
字号:
	  Value			  "0.1"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [110, 40, 140, 70]
	  Gain			  "0.2"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Height"
	  Ports			  [1, 1]
	  Position		  [220, 109, 260, 141]
	  InitialCondition	  "30"
	  LimitOutput		  on
	  LowerSaturationLimit	  "1"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [595, 202, 625, 233]
	  Inputs		  "*/"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [3, 1]
	  Position		  [300, 259, 330, 291]
	  Inputs		  "/**"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product2"
	  Ports			  [3, 1]
	  Position		  [300, 324, 330, 356]
	  Inputs		  "/**"
	}
	Block {
	  BlockType		  Math
	  Name			  "Square"
	  Ports			  [1, 1]
	  Position		  [510, 208, 540, 242]
	  Operator		  "square"
	}
	Block {
	  BlockType		  Math
	  Name			  "SquareRoot"
	  Ports			  [1, 1]
	  Position		  [45, 38, 75, 72]
	  Operator		  "sqrt"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [3, 1]
	  Position		  [175, 106, 200, 144]
	  ShowName		  off
	  Inputs		  "-++"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [3, 1]
	  Position		  [700, 221, 725, 259]
	  ShowName		  off
	  Inputs		  "-++"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [460, 213, 485, 237]
	  ShowName		  off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum3"
	  Ports			  [2, 1]
	  Position		  [215, 303, 240, 327]
	  ShowName		  off
	  Inputs		  "+-"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum4"
	  Ports			  [2, 1]
	  Position		  [210, 373, 235, 397]
	  ShowName		  off
	  Inputs		  "+-"
	}
	Block {
	  BlockType		  Terminator
	  Name			  "Terminator"
	  Position		  [300, 115, 320, 135]
	}
	Block {
	  BlockType		  Outport
	  Name			  "Cb"
	  Position		  [830, 233, 860, 247]
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Height"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "SquareRoot"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Height"
	  SrcPort		  1
	  Points		  [5, 0]
	  Branch {
	    Points		    [0, -100; -240, 0]
	    DstBlock		    "SquareRoot"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 140]
	    Branch {
	      DstBlock		      "Product1"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, 65]
	      DstBlock		      "Product2"
	      DstPort		      1
	    }
	  }
	  Branch {
	    DstBlock		    "Terminator"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "w1"
	  SrcPort		  1
	  Points		  [30, 0]
	  Branch {
	    Points		    [35, 0]
	    DstBlock		    "Sum"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 155]
	    DstBlock		    "Product1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  Points		  [25, 0]
	  Branch {
	    Points		    [80, 0]
	    DstBlock		    "Sum"
	    DstPort		    3
	  }
	  Branch {
	    Points		    [0, 190]
	    DstBlock		    "Product2"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Cb1"
	  SrcPort		  1
	  DstBlock		  "Sum3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Cb2"
	  SrcPort		  1
	  DstBlock		  "Sum4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum3"
	  SrcPort		  1
	  Points		  [40, 0]
	  DstBlock		  "Product1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Sum4"
	  SrcPort		  1
	  Points		  [45, 0]
	  DstBlock		  "Product2"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Concentration"
	  SrcPort		  1
	  Points		  [20, 0]
	  Branch {
	    Points		    [0, 165; -625, 0; 0, -15]
	    Branch {
	      Points		      [0, -70]
	      DstBlock		      "Sum3"
	      DstPort		      2
	    }
	    Branch {
	      DstBlock		      "Sum4"
	      DstPort		      2
	    }
	  }
	  Branch {
	    Points		    [0, 0]
	    Branch {
	      Points		      [0, -85; -245, 0]
	      Branch {
		Points			[-120, 0]
		DstBlock		"Sum2"
		DstPort			1
	      }
	      Branch {
		Points			[0, 55]
		DstBlock		"Product"
		DstPort			1
	      }
	    }
	    Branch {
	      DstBlock		      "Cb"
	      DstPort		      1
	    }
	  }
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum2"
	  SrcPort		  1
	  DstBlock		  "Square"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Concentration"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Square"
	  SrcPort		  1
	  DstBlock		  "Product"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product1"
	  SrcPort		  1
	  Points		  [320, 0; 0, -35]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Product2"
	  SrcPort		  1
	  Points		  [350, 0]
	  DstBlock		  "Sum1"
	  DstPort		  3
	}
      }
    }
    Block {
      BlockType		      UniformRandomNumber
      Name		      "Random Reference"
      Position		      [40, 54, 70, 86]
      Minimum		      "20"
      Maximum		      "23"
      Seed		      "round(now)"
      SampleTime	      "20"
    }
    Block {
      BlockType		      SubSystem
      Name		      "X(2Y)\n Graph"
      Ports		      [3]
      Position		      [655, 82, 690, 128]
      CopyFcn		      "sfunxy2([],[],[],'CopyBlock')"
      DeleteFcn		      "sfunxy2([],[],[],'DeleteBlock')"
      LoadFcn		      "sfunxy2([],[],[],'LoadBlock')"
      StartFcn		      "sfunxy2([],[],[],'Start')"
      StopFcn		      "sfunxy2([],[],[],'Stop')"
      NameChangeFcn	      "sfunxy2([],[],[],'NameChange')"
      TreatAsAtomicUnit	      off
      MaskType		      "X(2Y) scope."
      MaskDescription	      "X(2Y) scope using MATLAB graph window.  First i"
"nput is used as time base.  Enter plotting ranges."
      MaskHelp		      "This block can be used to explore limit cycles."
" Look at the m-file sfunxy.m to see how it works."
      MaskPromptString	      "x-min:|x-max:|y-min:|y-max:|Sample time:"
      MaskStyleString	      "edit,edit,edit,edit,edit"
      MaskTunableValueString  "on,on,on,on,on"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on"
      MaskVarAliasString      ",,,,"
      MaskVariables	      "xmin=@1;xmax=@2;ymin=@3;ymax=@4;st=@5;"
      MaskDisplay	      "plot([.05 .95 .95 .05 .05],[.45 .45 .95 .95 .45"
"], 0.5+cos(0:0.1:2*pi)*0.3,0.7+sin(0:0.1:2*pi)*0.2)"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      MaskValueString	      "0|5|21|22|-1"
      System {
	Name			"X(2Y)\n Graph"
	Location		[82, 157, 342, 335]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "x"
	  Position		  [25, 27, 55, 43]
	}
	Block {
	  BlockType		  Inport
	  Name			  "y1"
	  Position		  [25, 67, 55, 83]
	  Port			  "2"
	}
	Block {
	  BlockType		  Inport
	  Name			  "y2"
	  Position		  [25, 107, 55, 123]
	  Port			  "3"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [3, 1]
	  Position		  [105, 48, 135, 102]
	  ShowName		  off
	  Inputs		  "3"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "sfunxy"
	  Ports			  [1]
	  Position		  [175, 65, 225, 85]
	  ShowName		  off
	  FunctionName		  "sfunxy2"
	  Parameters		  "[xmin xmax ymin ymax], st"
	}
	Line {
	  SrcBlock		  "y2"
	  SrcPort		  1
	  Points		  [15, 0; 0, -20]
	  DstBlock		  "Mux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "y1"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "x"
	  SrcPort		  1
	  Points		  [15, 0; 0, 20]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "sfunxy"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Clock"
      SrcPort		      1
      Points		      [0, 30]
      DstBlock		      "X(2Y)\n Graph"
      DstPort		      1
    }
    Line {
      Name		      "Flow Rate"
      Labels		      [0, 0]
      SrcBlock		      "NN Predictive Controller"
      SrcPort		      1
      DstBlock		      "Plant\n(Continuous Stirred Tank Reactor)"
      DstPort		      1
    }
    Line {
      Name		      "Concentration"
      Labels		      [0, 0]
      SrcBlock		      "Plant\n(Continuous Stirred Tank Reactor)"
      SrcPort		      1
      Points		      [70, 0]
      Branch {
	DstBlock		"X(2Y)\n Graph"
	DstPort			2
      }
      Branch {
	Points			[0, 80; -455, 0; 0, -50]
	DstBlock		"NN Predictive Controller"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Random Reference"
      SrcPort		      1
      Points		      [40, 0]
      Branch {
	DstBlock		"NN Predictive Controller"
	DstPort			1
      }
      Branch {
	Points			[0, 140; 525, 0]
	DstBlock		"X(2Y)\n Graph"
	DstPort			3
      }
    }
    Annotation {
      Name		      "Neural Network Predictive Control of a Continou"
"s Stirred Tank Reactor\n(Double click on the \"?\" for more info)"
      Position		      [203, 252]
    }
    Annotation {
      Name		      "To start and stop the simulation, use the \"Sta"
"rt/Stop\"\nselection in the \"Simulation\" pull-down menu"
      Position		      [206, 297]
    }
  }
}

⌨️ 快捷键说明

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