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

📄 fuzzy_model_based_case2.mdl

📁 这是一个通过fuzzy和其他控制算法结合来对单摆进行控制的仿真程序!
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      Position		      [520, 89, 550, 121]
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope4"
      Ports		      [1]
      Position		      [420, 109, 450, 141]
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope5"
      Ports		      [1]
      Position		      [615, 84, 645, 116]
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-35"
      YMax		      "35"
      SaveName		      "ScopeData5"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope7"
      Ports		      [1]
      Position		      [680, 334, 710, 366]
      Location		      [188, 365, 512, 604]
      Open		      off
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      YMin		      "-0.2"
      YMax		      "0.15"
      SaveName		      "ScopeData7"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      Signum
      Name		      "Sign1"
      Position		      [325, 245, 355, 275]
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave"
      Position		      [45, 195, 75, 225]
      SineType		      "Time based"
      Amplitude		      "2"
      Phase		      "pi/2"
      SampleTime	      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem"
      Ports		      [0, 1]
      Position		      [275, 139, 310, 181]
      TreatAsAtomicUnit	      off
      System {
	Name			"Subsystem"
	Location		[492, 332, 907, 597]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Abs
	  Name			  "Abs"
	  Position		  [230, 130, 260, 160]
	}
	Block {
	  BlockType		  Abs
	  Name			  "Abs1"
	  Position		  [165, 85, 180, 115]
	}
	Block {
	  BlockType		  Abs
	  Name			  "Abs2"
	  Position		  [230, 30, 260, 60]
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [230, 185, 260, 215]
	  Value			  "12"
	}
	Block {
	  BlockType		  From
	  Name			  "From"
	  Position		  [110, 146, 150, 174]
	  BackgroundColor	  "orange"
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "UK"
	}
	Block {
	  BlockType		  From
	  Name			  "From1"
	  Position		  [75, 31, 115, 59]
	  BackgroundColor	  "green"
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "x2"
	}
	Block {
	  BlockType		  From
	  Name			  "From2"
	  Position		  [25, 91, 65, 119]
	  BackgroundColor	  "cyan"
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "x1"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [145, 27, 190, 63]
	  Gain			  "0.1"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [3, 1]
	  Position		  [95, 83, 140, 117]
	  Inputs		  "3"
	  InputSameDT		  off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [3, 1]
	  Position		  [285, 135, 305, 155]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "+++"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  Port {
	    PortNumber		    1
	    Name		    "x2dot"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [270, 90, 290, 110]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "++|"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Outport
	  Name			  "FU"
	  Position		  [345, 138, 375, 152]
	}
	Line {
	  SrcBlock		  "From2"
	  SrcPort		  1
	  Points		  [-10, 0; 15, 0]
	  Branch {
	    Points		    [0, -5]
	    Branch {
	      Points		      [0, -10]
	      DstBlock		      "Product"
	      DstPort		      1
	    }
	    Branch {
	      DstBlock		      "Product"
	      DstPort		      2
	    }
	  }
	  Branch {
	    Points		    [0, 5]
	    DstBlock		    "Product"
	    DstPort		    3
	  }
	}
	Line {
	  SrcBlock		  "From1"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Abs2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Product"
	  SrcPort		  1
	  DstBlock		  "Abs1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "From"
	  SrcPort		  1
	  Points		  [0, -15]
	  DstBlock		  "Abs"
	  DstPort		  1
	}
	Line {
	  Name			  "x2dot"
	  Labels		  [0, 0]
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "FU"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Abs"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Abs1"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Abs2"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  Points		  [30, 0]
	  DstBlock		  "Sum"
	  DstPort		  3
	}
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [235, 210, 255, 230]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "+-|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [95, 315, 115, 335]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "-+|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum2"
      Ports		      [2, 1]
      Position		      [205, 315, 225, 335]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum4"
      Ports		      [2, 1]
      Position		      [375, 70, 395, 90]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "++|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum5"
      Ports		      [2, 1]
      Position		      [625, 340, 645, 360]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "-+|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum6"
      Ports		      [2, 1]
      Position		      [315, 210, 335, 230]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "++|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      Port {
	PortNumber		1
	Name			"Q"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "linear_plant"
      Ports		      [1, 1]
      Position		      [605, 165, 645, 225]
      TreatAsAtomicUnit	      off
      System {
	Name			"linear_plant"
	Location		[372, 138, 992, 428]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "u"
	  Position		  [240, 168, 270, 182]
	}
	Block {
	  BlockType		  From
	  Name			  "From"
	  Position		  [150, 21, 190, 49]
	  BackgroundColor	  "green"
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "x2"
	}
	Block {
	  BlockType		  From
	  Name			  "From1"
	  Position		  [15, 141, 55, 169]
	  BackgroundColor	  "cyan"
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "x1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Fuzzy Logic \nController"
	  Ports			  [1, 1]
	  Position		  [85, 129, 145, 181]
	  FontName		  "Arial"
	  SourceBlock		  "fuzblock/Fuzzy Logic \nController"
	  SourceType		  "FIS"
	  fis			  "fuzzy_model"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [220, 17, 265, 53]
	  Gain			  "-0.1"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto"
	  Position		  [435, 80, 475, 110]
	  BackgroundColor	  "green"
	  GotoTag		  "x2"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto1"
	  Position		  [575, 115, 615, 145]
	  BackgroundColor	  "cyan"
	  GotoTag		  "x1"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  InitialCondition
	  Name			  "IC"
	  Position		  [520, 160, 550, 190]
	  Value			  "2"
	}
	Block {
	  BlockType		  InitialCondition
	  Name			  "IC1"
	  Position		  [420, 160, 450, 190]
	  Value			  "2"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [360, 160, 390, 190]
	  Port {
	    PortNumber		    1
	    Name		    "x1dot=x2"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator1"
	  Ports			  [1, 1]
	  Position		  [470, 160, 500, 190]
	  Port {
	    PortNumber		    1
	    Name		    "x1"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [175, 71, 220, 104]
	  InputSameDT		  off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [305, 165, 325, 185]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "++|"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  Port {
	    PortNumber		    1
	    Name		    "x2dot"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [270, 80, 290, 100]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "++|"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Outport
	  Name			  "x1"
	  Position		  [570, 168, 600, 182]
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [20, 0]
	  DstBlock		  "Sum"
	  DstPort		  1

⌨️ 快捷键说明

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