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

📄 predcstr.mdl

📁 神经网络预测控制程序的源代码
💻 MDL
📖 第 1 页 / 共 4 页
字号:
		  MaskIconUnits		  "autoscale"
		}
		Block {
		  BlockType		  Gain
		  Name			  "Gain"
		  Position		  [90, 25, 120, 55]
		  Gain			  "-2"
		}
		Block {
		  BlockType		  Gain
		  Name			  "Gain1"
		  Position		  [370, 30, 400, 60]
		  Gain			  "2"
		}
		Block {
		  BlockType		  Math
		  Name			  "Reciprocal"
		  Ports			  [1, 1]
		  Position		  [295, 30, 325, 60]
		  Operator		  "reciprocal"
		  MaskIconFrame		  on
		  MaskIconOpaque	  on
		  MaskIconRotate	  "none"
		  MaskIconUnits		  "autoscale"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Sum"
		  Ports			  [2, 1]
		  Position		  [225, 27, 255, 58]
		}
		Block {
		  BlockType		  Sum
		  Name			  "Sum1"
		  Ports			  [2, 1]
		  Position		  [445, 27, 475, 58]
		  Inputs		  "+-"
		}
		Block {
		  BlockType		  Constant
		  Name			  "one"
		  Position		  [160, 85, 180, 105]
		}
		Block {
		  BlockType		  Constant
		  Name			  "one1"
		  Position		  [375, 85, 395, 105]
		}
		Block {
		  BlockType		  Outport
		  Name			  "a"
		  Position		  [515, 38, 545, 52]
		}
		Line {
		  SrcBlock		  "n"
		  SrcPort		  1
		  DstBlock		  "Gain"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Gain"
		  SrcPort		  1
		  DstBlock		  "Exp"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Exp"
		  SrcPort		  1
		  Points		  [20, 0]
		  DstBlock		  "Sum"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "one"
		  SrcPort		  1
		  Points		  [25, 0]
		  DstBlock		  "Sum"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Sum"
		  SrcPort		  1
		  DstBlock		  "Reciprocal"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Reciprocal"
		  SrcPort		  1
		  DstBlock		  "Gain1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Gain1"
		  SrcPort		  1
		  Points		  [25, 0]
		  DstBlock		  "Sum1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "one1"
		  SrcPort		  1
		  Points		  [30, 0]
		  DstBlock		  "Sum1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Sum1"
		  SrcPort		  1
		  DstBlock		  "a"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "yhat"
	      Position		      [885, 263, 915, 277]
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "yhat1"
	      Position		      [585, 153, 615, 167]
	      Port		      "2"
	    }
	    Line {
	      SrcBlock		      "netsum1"
	      SrcPort		      1
	      DstBlock		      "purelin"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant1"
	      SrcPort		      1
	      Points		      [10, 0; 0, -55]
	      DstBlock		      "netsum1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Matrix\nGain2"
	      SrcPort		      1
	      DstBlock		      "netsum1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "netsum"
	      SrcPort		      1
	      DstBlock		      "tansig"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant"
	      SrcPort		      1
	      Points		      [15, 0]
	      DstBlock		      "netsum"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Matrix\nGain1"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "netsum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Matrix\nGain"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "tansig"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		DstBlock		"Matrix\nGain2"
		DstPort			1
	      }
	      Branch {
		Points			[0, -70]
		DstBlock		"yhat1"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Discrete State-Space1"
	      SrcPort		      1
	      DstBlock		      "Matrix\nGain"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Fcn"
	      SrcPort		      1
	      Points		      [0, 40]
	      DstBlock		      "Switch"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Switch"
	      SrcPort		      1
	      Points		      [5, 0]
	      DstBlock		      "Discrete State-Space1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "u"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		Points			[5, 0]
		DstBlock		"Fcn"
		DstPort			1
	      }
	      Branch {
		Points			[0, 110; 70, 0]
		DstBlock		"Switch"
		DstPort			3
	      }
	    }
	    Line {
	      SrcBlock		      "Constant2"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Switch"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Discrete State-Space2"
	      SrcPort		      1
	      DstBlock		      "Matrix\nGain1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Unit Delay1"
	      SrcPort		      1
	      DstBlock		      "Discrete State-Space2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant3"
	      SrcPort		      1
	      Points		      [15, 0]
	      DstBlock		      "Switch1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Switch1"
	      SrcPort		      1
	      DstBlock		      "Unit Delay1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Fcn1"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "Switch1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "y"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		DstBlock		"Fcn1"
		DstPort			1
	      }
	      Branch {
		Points			[0, 110; 75, 0]
		DstBlock		"Switch1"
		DstPort			3
	      }
	    }
	    Line {
	      SrcBlock		      "Constant4"
	      SrcPort		      1
	      Points		      [15, 0]
	      DstBlock		      "Switch2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Switch2"
	      SrcPort		      1
	      DstBlock		      "yhat"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Fcn2"
	      SrcPort		      1
	      Points		      [70, 0]
	      DstBlock		      "Switch2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "purelin"
	      SrcPort		      1
	      Points		      [0, 0]
	      Branch {
		DstBlock		"Fcn2"
		DstPort			1
	      }
	      Branch {
		Points			[0, 40]
		DstBlock		"Switch2"
		DstPort			3
	      }
	    }
	  }
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [1, 1]
	  Position		  [145, 210, 205, 240]
	  Orientation		  "down"
	  NamePlacement		  "alternate"
	  FunctionName		  "predopt"
	  Parameters		  "N2,Ts,Nu,maxiter,csrchfun,rho,alpha,S1,IW,L"
"W1_2,LW2_1,B1,B2,Ni,Nj,min_i,max_i,minp,maxp,mint,maxt,Normalize"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Control Signal"
	  Position		  [105, 300, 135, 315]
	  Orientation		  "down"
	  NamePlacement		  "alternate"
	}
	Line {
	  Labels		  [0, 0]
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "S-Function"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "S-Function"
	  SrcPort		  1
	  Points		  [0, 40]
	  Branch {
	    DstBlock		    "NN model"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Control Signal"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "NN model"
	  SrcPort		  2
	  Points		  [40, 0; 0, -185]
	  DstBlock		  "Mux"
	  DstPort		  4
	}
	Line {
	  SrcBlock		  "NN model"
	  SrcPort		  1
	  Points		  [15, 0; 0, -255; -110, 0]
	  DstBlock		  "Mux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Reference"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Plant output"
	  SrcPort		  1
	  Points		  [0, -15]
	  Branch {
	    Points		    [0, -30]
	    DstBlock		    "NN model"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [-155, 0; 0, -275; 135, 0]
	    DstBlock		    "Mux"
	    DstPort		    2
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Plant\n(Continuous Stirred Tank Reactor)"
      Ports		      [1, 1]
      Position		      [405, 68, 525, 142]
      TreatAsAtomicUnit	      off
      MaskType		      "Continuous Stirred Tank Reactor"
      MaskInitialization      "xl = [0    .45  .45  NaN   .3   .3  1.   1.    "
"NaN ];\nyl = [1   1    .7    NaN   .8   .2    .2   .8  NaN  ]+.1;\nx2 = [.85 "
".85   1.2   NaN .8 .85 .9 NaN .4 .45 .5 ];\ny2 = [.7   1      1      NaN .8 ."
"7   .8 NaN  .8 .7 .8]+.1;\nx3 = [.3 1 NaN .8 .8 1.1 NaN 1 1.1 1];\ny3 = [.6 ."
"6 NaN .2 .1 .1 NaN .15 .1 .05]+.1;\nt=(0:24)/24*2*pi;\nxs = .07*cos(t)+.9;\ny"
"s = .07*sin(t)+.75;\n\n"
      MaskDisplay	      "plot([[xl NaN x2 NaN x3]*.9-.075 ], [[yl  NaN y"
"2 NaN y3]*.9-.1 ]);\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "normalized"
      Port {
	PortNumber		1
	Name			"Concentration"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
      System {
	Name			"Plant\n(Continuous Stirred Tank Reactor)"
	Location		[103, 226, 986, 662]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "w1"
	  Position		  [60, 113, 90, 127]
	}
	Block {
	  BlockType		  Constant
	  Name			  "Cb1"
	  Position		  [135, 295, 165, 325]
	  Value			  "24.9"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Cb2"
	  Position		  [135, 365, 165, 395]
	  Value			  "0.10"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Concentration"
	  Ports			  [1, 1]
	  Position		  [750, 222, 785, 258]
	  InitialCondition	  "22"
	  LowerSaturationLimit	  "0"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [390, 215, 420, 245]
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [20, 135, 50, 165]

⌨️ 快捷键说明

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