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

📄 negfa_nn.mdl

📁 书籍代码:遗传演算法原理与应用_活用MATLAB(Source Code)
💻 MDL
📖 第 1 页 / 共 3 页
字号:
	    }
	    Line {
	      SrcBlock		      "LW{2,1}"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Delays 1"
	      SrcPort		      1
	      DstBlock		      "LW{2,1}"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "a{1} "
	      SrcPort		      1
	      DstBlock		      "Delays 1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Goto
	  Name			  "a{1}"
	  Position		  [380, 40, 400, 60]
	  GotoTag		  "feedback1"
	  TagVisibility		  "local"
	  MaskDisplay		  "plot(cos(0:.1:2*pi),sin(0:.1:2*pi))"
	  MaskIconFrame		  off
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Outport
	  Name			  "y{1}"
	  Position		  [380, 120, 400, 140]
	  BackgroundColor	  "magenta"
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "Layer 2"
	  SrcPort		  1
	  DstBlock		  "y{1}"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " a{1} "
	  SrcPort		  1
	  DstBlock		  "Layer 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Layer 1"
	  SrcPort		  1
	  DstBlock		  "a{1}"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "p{1}"
	  SrcPort		  1
	  DstBlock		  "Layer 1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Plant math.\nSubsystem"
      Ports		      [1, 2]
      Position		      [385, 116, 440, 154]
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      System {
	Name			"Plant math.\nSubsystem"
	Location		[85, 291, 541, 452]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"automatic"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "u"
	  Position		  [25, 33, 55, 47]
	  Port			  "1"
	  LatchInput		  off
	  Interpolate		  on
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [190, 105, 250, 135]
	  Orientation		  "left"
	  Expr			  "9.81*sin(u(1))"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [175, 70, 205, 100]
	  Orientation		  "left"
	  Gain			  "2"
	  Multiplication	  "Element-wise(K.*u)"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [180, 25, 210, 55]
	  ExternalReset		  "none"
	  InitialConditionSource  "internal"
	  InitialCondition	  "Init_V*pi/180"
	  LimitOutput		  off
	  UpperSaturationLimit	  "inf"
	  LowerSaturationLimit	  "-inf"
	  ShowSaturationPort	  off
	  ShowStatePort		  off
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator1"
	  Ports			  [1, 1]
	  Position		  [240, 25, 270, 55]
	  ExternalReset		  "none"
	  InitialConditionSource  "internal"
	  InitialCondition	  "Init_P*pi/180"
	  LimitOutput		  off
	  UpperSaturationLimit	  "inf"
	  LowerSaturationLimit	  "-inf"
	  ShowSaturationPort	  off
	  ShowStatePort		  off
	  AbsoluteTolerance	  "auto"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [3, 1]
	  Position		  [145, 30, 165, 50]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-+"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "x1"
	  Position		  [315, 33, 345, 47]
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Block {
	  BlockType		  Outport
	  Name			  "x2"
	  Position		  [315, 73, 345, 87]
	  Port			  "2"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Integrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Integrator1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 40]
	    Branch {
	      Points		      [0, 5]
	      DstBlock		      "Gain"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, 0]
	      DstBlock		      "x2"
	      DstPort		      1
	    }
	  }
	}
	Line {
	  SrcBlock		  "u"
	  SrcPort		  1
	  Points		  [74, 0]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator1"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, 80]
	    DstBlock		    "Fcn"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "x1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [-30, 0]
	  DstBlock		  "Sum"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  Points		  [-36, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [150, 135, 170, 155]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold"
      Position		      [330, 116, 365, 154]
      SampleTime	      "0.05"
    }
    Block {
      BlockType		      Scope
      Name		      "y{1}"
      Ports		      [1]
      Position		      [435, 45, 455, 65]
      Floating		      off
      Location		      [6, 58, 275, 227]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      Grid		      "on"
      TimeRange		      "20"
      YMin		      "-100"
      YMax		      "200"
      SaveToWorkspace	      on
      SaveName		      "Y"
      DataFormat	      "Array"
      LimitDataPoints	      on
      MaxDataPoints	      "50000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Outport
      Name		      "err"
      Position		      [280, 178, 310, 192]
      Port		      "1"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Outport
      Name		      "in"
      Position		      [280, 208, 310, 222]
      Port		      "2"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Outport
      Name		      "x1"
      Position		      [425, 13, 455, 27]
      Port		      "3"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Outport
      Name		      "x2"
      Position		      [420, 83, 450, 97]
      Port		      "4"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Line {
      SrcBlock		      "Zero-Order\nHold"
      SrcPort		      1
      DstBlock		      "Plant math.\nSubsystem"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Gain2"
      SrcPort		      1
      Points		      [5, 0]
      DstBlock		      "x2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Gain"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Plant math.\nSubsystem"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	Points			[5, 0; 0, -15; -150, 0]
	DstBlock		"Gain1"
	DstPort			1
      }
      Branch {
	Points			[0, 45]
	DstBlock		"Sum"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Plant math.\nSubsystem"
      SrcPort		      2
      Points		      [20, 0; 0, -40; -145, 0]
      Branch {
	DstBlock		"Gain2"
	DstPort			1
      }
      Branch {
	Points			[-135, 0]
	DstBlock		"Mux"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Neural Network"
      SrcPort		      1
      DstBlock		      "Zero-Order\nHold"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Neural Network"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      Points		      [0, 0]
      Branch {
	Points			[5, 0; 0, -20]
	DstBlock		"Mux"
	DstPort			1
      }
      Branch {
	Points			[0, 40]
	DstBlock		"err"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Band-Limited\nWhite Noise"
      SrcPort		      1
      DstBlock		      "Gain3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Gain3"
      SrcPort		      1
      Points		      [0, 15]
      Branch {
	Points			[0, 65; -240, 0; 0, 35]
	Branch {
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 70]
	  DstBlock		  "in"
	  DstPort		  1
	}
      }
      Branch {
	DstBlock		"Mux1"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Gain1"
      SrcPort		      1
      Points		      [0, -5]
      Branch {
	DstBlock		"Mux1"
	DstPort			1
      }
      Branch {
	Points			[0, -5]
	DstBlock		"x1"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Mux1"
      SrcPort		      1
      Points		      [10, 0]
      DstBlock		      "y{1}"
      DstPort		      1
    }
    Annotation {
      Position		      [112, 53]
      Text		      "negfa_nn.mdl\nPenChen Chou, July 29,2001\nUse w"
"ith appcs2.m file.\nSimulation is 14 sec. but the \nsample time must be 0.05 "
"sec.\nInit_P is the initial angle in degrees,\nInit_V is the initial velocity"
" in deg./s."
    }
    Annotation {
      Position		      [118, 203]
      Text		      "Test values: Init_P=10; Init_V=0;"
    }
  }
}

⌨️ 快捷键说明

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