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

📄 pendulum1.mdl

📁 自己编制的倒立摆matlab7的程序
💻 MDL
📖 第 1 页 / 共 4 页
字号:
"857;-1.6473058792088371;-0.71970402213146856]"
		  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		  ""
		  ShowPortLabels	  on
		}
		Block {
		  BlockType		  Outport
		  Name			  "lz{2,1}"
		  Position		  [420, 60, 440, 80]
		  BackgroundColor	  "magenta"
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "IW{2,1}(1,:)'"
		  SrcPort		  1
		  DstBlock		  "dotprod1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "ad{2,1}"
		  SrcPort		  1
		  DstBlock		  "dotprod1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "dotprod1"
		  SrcPort		  1
		  DstBlock		  "Mux"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Mux"
		  SrcPort		  1
		  DstBlock		  "lz{2,1}"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "b{2}"
	      Position		      [160, 80, 200, 100]
	      BackgroundColor	      "lightBlue"
	      Value		      "0.20398330965527914"
	      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	      ""
	      ShowPortLabels	      on
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "a{2}"
	      Position		      [360, 60, 380, 80]
	      BackgroundColor	      "magenta"
	      IconDisplay	      "Port number"
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "a{1} "
	      SrcPort		      1
	      DstBlock		      "Delays 1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Delays 1"
	      SrcPort		      1
	      DstBlock		      "LW{2,1}"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "LW{2,1}"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "b{2}"
	      SrcPort		      1
	      DstBlock		      "netsum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "netsum"
	      SrcPort		      1
	      DstBlock		      "purelin"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "purelin"
	      SrcPort		      1
	      DstBlock		      "a{2}"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Goto
	  Name			  "a{1}"
	  Position		  [380, 40, 400, 60]
	  DialogController	  "Simulink.DDGSource"
	  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"
	  IconDisplay		  "Port number"
	  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		  "y{1}"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1]
      Position		      [725, 294, 755, 326]
      Location		      [5, 56, 1029, 741]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-0.008"
      YMax		      "0.008"
      DataFormat	      "StructureWithTime"
      MaxDataPoints	      "5000000"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [1]
      Position		      [695, 179, 725, 211]
      Location		      [5, 56, 1029, 741]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.73472e-018"
      YMax		      "0.08"
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
      MaxDataPoints	      "5000000"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope2"
      Ports		      [1]
      Position		      [415, 129, 445, 161]
      Location		      [5, 56, 1029, 741]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-7"
      YMax		      "7"
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
      MaxDataPoints	      "5000000"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope3"
      Ports		      [1]
      Position		      [370, 369, 400, 401]
      Location		      [5, 56, 1029, 741]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      TimeRange		      "11.44999999999999"
      YMin		      "-0.8040790442217316"
      YMax		      "-0.3838491591642603"
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
      MaxDataPoints	      "5000000"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope4"
      Ports		      [1]
      Position		      [830, 234, 860, 266]
      Location		      [5, 56, 1029, 741]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-1.73472e-018"
      YMax		      "0.08"
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
      MaxDataPoints	      "5000000"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem"
      Ports		      [1, 4]
      Position		      [435, 221, 510, 284]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"Subsystem"
	Location		[2, 82, 1014, 721]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "u"
	  Position		  [100, 73, 130, 87]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [440, 166, 485, 194]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  Expr			  "m*L*u*u*sin(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn2"
	  Position		  [410, 326, 455, 354]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  Expr			  "m*g*L*sin(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn3"
	  Position		  [460, 221, 505, 249]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  Expr			  "m*L*cos(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn4"
	  Position		  [200, 286, 245, 314]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  Expr			  "m*L*cos(u)"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn5"
	  Position		  [280, 351, 325, 379]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  Expr			  "m*L*sin(u)"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain2"
	  Position		  [450, 415, 480, 445]
	  Gain			  "1/(m*L*L)"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain4"
	  Position		  [435, 80, 465, 110]
	  Gain			  "1/(m+M)"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [505, 80, 535, 110]
	  IgnoreLimit		  off
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator1"
	  Ports			  [1, 1]
	  Position		  [640, 80, 670, 110]
	  IgnoreLimit		  off
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator2"
	  Ports			  [1, 1]
	  Position		  [525, 415, 555, 445]
	  IgnoreLimit		  off
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator3"
	  Ports			  [1, 1]
	  Position		  [630, 415, 660, 445]
	  LimitOutput		  on
	  UpperSaturationLimit	  "1.57"
	  LowerSaturationLimit	  "-1.57"
	  IgnoreLimit		  off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [345, 225, 360, 260]
	  Orientation		  "left"
	  NamePlacement		  "alternate"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [240, 477, 255, 513]
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product2"
	  Ports			  [3, 1]
	  Position		  [290, 412, 305, 448]
	  Inputs		  "3"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Subtract"
	  Ports			  [3, 1]
	  Position		  [315, 70, 335, 120]
	  Inputs		  "+-+"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Subtract1"
	  Ports			  [3, 1]
	  Position		  [380, 401, 395, 459]
	  Inputs		  "++-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "y"
	  Position		  [695, 88, 725, 102]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "ydot"
	  Position		  [700, 143, 730, 157]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "tetha"
	  Position		  [710, 423, 740, 437]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "tethadot"
	  Position		  [710, 473, 740, 487]
	  Port			  "4"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Integrator2"
	  SrcPort		  1
	  Points		  [0, 0; 25, 0]
	  Branch {
	    Points		    [15, 0]
	    Branch {
	      DstBlock		      "Integrator3"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, 50]
	      Branch {
		Points			[-325, 0]
		DstBlock		"Product2"
		DstPort			3
	      }
	      Branch {
		DstBlock		"tethadot"
		DstPort			1
	      }
	    }
	  }
	  Branch {
	    Points		    [0, -165; -210, 0]
	    DstBlock		    "Product"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  Points		  [0, 0; 45, 0]
	  Branch {
	    DstBlock		    "Integrator1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 55]
	    Branch {
	      DstBlock		      "ydot"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [-50, 0; 0, 160; -280, 0; 0, 120]
	      DstBlock		      "Product2"
	      DstPort		      2
	    }
	  }
	}
	Line {
	  SrcBlock		  "Fcn2"
	  SrcPort		  1
	  Points		  [-45, 0; 0, 70]
	  DstBlock		  "Subtract1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "u"
	  SrcPort		  1
	  DstBlock		  "Subtract"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator1"
	  SrcPort		  1
	  DstBlock		  "y"
	  DstPort		  1
	}
	Line {
	  Labels		  [0, 0]
	  SrcBlock		  "Integrator3"
	  SrcPort		  1
	  Points		  [20, 0]
	  Branch {
	    DstBlock		    "tetha"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -90]
	    Branch {
	      Points		      [0, -40]
	      Branch {
		Points			[0, -65]
		Branch {
		  Points		  [0, -55]
		  DstBlock		  "Fcn1"
		  DstPort		  1
		}
		Branch {
		  DstBlock		  "Fcn3"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Fcn4"
		DstPort			1
	      }
	    }
	    Branch {
	      Points		      [-155, 0]
	      Branch {
		DstBlock		"Fcn2"
		DstPort			1
	      }
	      Branch {
		Points			[0, 25]
		DstBlock		"Fcn5"
		DstPort			1
	      }
	    }
	  }
	}
	Line {
	  SrcBlock		  "Gain4"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Integrator"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 40; -330, 0; 0, 370]
	    DstBlock		    "Product1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Subtract"
	  SrcPort		  1
	  DstBlock		  "Gain4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  Points		  [-70, 0; 0, -150]
	  DstBlock		  "Subtract"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fcn3"
	  SrcPort		  1

⌨️ 快捷键说明

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