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

📄 pendulum1ctrl.mdl

📁 用神经网络来控制一阶倒立摆
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	      DstBlock		      "tansig"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "tansig"
	      SrcPort		      1
	      DstBlock		      "a{2}"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Layer 3"
	  Ports			  [1, 1]
	  Position		  [190, 120, 250, 140]
	  BackgroundColor	  "lightBlue"
	  TreatAsAtomicUnit	  off
	  System {
	    Name		    "Layer 3"
	    Location		    [480, 85, 1060, 386]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "a{2} "
	      Position		      [40, 40, 60, 60]
	      BackgroundColor	      "magenta"
	      PortDimensions	      "16"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Delays 1"
	      Ports		      [1, 1]
	      Position		      [100, 40, 120, 60]
	      BackgroundColor	      "lightBlue"
	      TreatAsAtomicUnit	      off
	      MaskDisplay	      "disp('TDL')"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      System {
		Name			"Delays 1"
		Location		[480, 85, 1060, 386]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"A4"
		PaperUnits		"centimeters"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "p{3}"
		  Position		  [60, 40, 80, 60]
		  Orientation		  "down"
		  BackgroundColor	  "magenta"
		  NamePlacement		  "alternate"
		  PortDimensions	  "16"
		}
		Block {
		  BlockType		  Mux
		  Name			  "mux"
		  Ports			  [1, 1]
		  Position		  [200, 60, 240, 80]
		  BackgroundColor	  "lightBlue"
		  Inputs		  "1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "pd{3,2}"
		  Position		  [300, 60, 320, 80]
		  BackgroundColor	  "magenta"
		}
		Line {
		  SrcBlock		  "p{3}"
		  SrcPort		  1
		  DstBlock		  "mux"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "mux"
		  SrcPort		  1
		  DstBlock		  "pd{3,2}"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "LW{3,2}"
	      Ports		      [1, 1]
	      Position		      [160, 40, 200, 60]
	      BackgroundColor	      "lightBlue"
	      TreatAsAtomicUnit	      off
	      MaskDisplay	      "disp('weight')"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	      System {
		Name			"LW{3,2}"
		Location		[480, 85, 1060, 386]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"A4"
		PaperUnits		"centimeters"
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "ad{3,2}"
		  Position		  [40, 60, 60, 80]
		  BackgroundColor	  "magenta"
		  PortDimensions	  "16"
		}
		Block {
		  BlockType		  Constant
		  Name			  "IW{3,2}(1,:)'"
		  Position		  [140, 40, 180, 60]
		  BackgroundColor	  "lightBlue"
		  Value			  "[2.0301766992402528;0.6217598659162"
"874;-0.65070966748281656;0.46123582790403544;-0.081085437133411764;1.70911453"
"99286709;0.38576936378297305;3.5398551155152091;-3.7361200586899979;-0.834965"
"46443479924;-0.21908121353477569;-0.43702307099888449;1.0572915556619551;0.42"
"017726802177785;1.1766978347694914;0.54925100200503763]"
		  MaskDisplay		  "disp('weights')"
		  MaskIconFrame		  on
		  MaskIconOpaque	  on
		  MaskIconRotate	  "none"
		  MaskIconUnits		  "autoscale"
		}
		Block {
		  BlockType		  Mux
		  Name			  "Mux"
		  Ports			  [1, 1]
		  Position		  [340, 60, 380, 80]
		  Inputs		  "1"
		}
		Block {
		  BlockType		  Reference
		  Name			  "dotprod1"
		  Ports			  [2, 1]
		  Position		  [240, 40, 260, 80]
		  BackgroundColor	  "lightBlue"
		  SourceBlock		  "neural/Weight Functions/dotprod"
		  SourceType		  ""
		}
		Block {
		  BlockType		  Outport
		  Name			  "lz{3,2}"
		  Position		  [420, 60, 440, 80]
		  BackgroundColor	  "magenta"
		}
		Line {
		  SrcBlock		  "IW{3,2}(1,:)'"
		  SrcPort		  1
		  DstBlock		  "dotprod1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "ad{3,2}"
		  SrcPort		  1
		  DstBlock		  "dotprod1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "dotprod1"
		  SrcPort		  1
		  DstBlock		  "Mux"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Mux"
		  SrcPort		  1
		  DstBlock		  "lz{3,2}"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "b{3}"
	      Position		      [160, 80, 200, 100]
	      BackgroundColor	      "lightBlue"
	      Value		      "0.63672787567681033"
	      MaskDisplay	      "disp('bias')"
	      MaskIconFrame	      on
	      MaskIconOpaque	      on
	      MaskIconRotate	      "none"
	      MaskIconUnits	      "autoscale"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "netsum"
	      Ports		      [2, 1]
	      Position		      [240, 60, 260, 80]
	      BackgroundColor	      "lightBlue"
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "purelin"
	      Ports		      [1, 1]
	      Position		      [300, 60, 320, 80]
	      BackgroundColor	      "lightBlue"
	      SourceBlock	      "neural/Transfer Functions/purelin"
	      SourceType	      ""
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "a{3}"
	      Position		      [360, 60, 380, 80]
	      BackgroundColor	      "magenta"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "a{2} "
	      SrcPort		      1
	      DstBlock		      "Delays 1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Delays 1"
	      SrcPort		      1
	      DstBlock		      "LW{3,2}"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "LW{3,2}"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "b{3}"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "netsum"
	      SrcPort		      1
	      DstBlock		      "purelin"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "purelin"
	      SrcPort		      1
	      DstBlock		      "a{3}"
	      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		  Goto
	  Name			  "a{2}"
	  Position		  [380, 80, 400, 100]
	  GotoTag		  "feedback2"
	  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, 160, 400, 180]
	  BackgroundColor	  "magenta"
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "p{1}"
	  SrcPort		  1
	  DstBlock		  "Layer 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Layer 1"
	  SrcPort		  1
	  DstBlock		  "a{1}"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " a{1} "
	  SrcPort		  1
	  DstBlock		  "Layer 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Layer 2"
	  SrcPort		  1
	  DstBlock		  "a{2}"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " a{2} "
	  SrcPort		  1
	  DstBlock		  "Layer 3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Layer 3"
	  SrcPort		  1
	  DstBlock		  "y{1}"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Scope3"
      Ports		      [4]
      Position		      [515, 93, 545, 127]
      Location		      [6, 53, 798, 598]
      Open		      off
      NumInputPorts	      "4"
      List {
	ListType		AxesTitles
	axes1			"x"
	axes2			"dx"
	axes3			"phi"
	axes4			"dphi"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
	axes3			""
	axes4			""
      }
      TimeRange		      "50"
      YMin		      "-0.05~-0.4~-1~-0.5"
      YMax		      "0.15~0.4~0.5~1.5"
      DataFormat	      "StructureWithTime"
      SampleInput	      on
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace"
      Position		      [510, 155, 570, 185]
      VariableName	      "x1_1"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace1"
      Position		      [510, 205, 570, 235]
      VariableName	      "x1_3"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace2"
      Position		      [510, 310, 570, 340]
      VariableName	      "x1_4"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace3"
      Position		      [510, 255, 570, 285]
      VariableName	      "x1_2"
      MaxDataPoints	      "inf"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      SubSystem
      Name		      "pendulum1"
      Ports		      [1, 4]
      Position		      [325, 71, 385, 149]
      TreatAsAtomicUnit	      off
      MaskType		      "Inverted-Pendulum"
      MaskPromptString	      "The Initialization Parameter: x,v,sita,omiga"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "Init=@1;"
      MaskInitialization      "Init=Init"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "[0.05 0 0.08 0]'"
      System {
	Name			"pendulum1"
	Location		[18, 83, 751, 561]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "input"
	  Position		  [25, 103, 55, 117]
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [530, 170, 555, 190]
	  Orientation		  "left"
	  ShowName		  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [280, 119, 300, 141]
	  Orientation		  "left"
	  ShowName		  off
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [239, 240, 281, 270]
	  Orientation		  "down"
	  Expr			  "u*u"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [431, 260, 469, 290]
	  Orientation		  "down"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Expr			  "sin(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn2"
	  Position		  [515, 265, 555, 290]
	  Orientation		  "down"
	  ShowName		  off
	  Expr			  "cos(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn3"
	  Position		  [345, 170, 385, 200]
	  Orientation		  "left"
	  ShowName		  off
	  Expr			  "sin(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn4"
	  Position		  [599, 245, 641, 275]
	  Orientation		  "up"
	  ShowName		  off
	  Expr			  "u*u"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn5"
	  Position		  [200, 64, 255, 96]
	  ShowName		  off
	  Expr			  "u(1)/u(2)"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [220, 30, 275, 60]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Gain			  "50/9.801"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [435, 335, 465, 365]
	  Orientation		  "down"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Gain			  "9.801"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain2"
	  Position		  [200, 399, 245, 431]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Gain			  "3/4"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain3"
	  Position		  [420, 170, 450, 200]
	  Orientation		  "left"

⌨️ 快捷键说明

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