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

📄 quadrotorsim.mdl

📁 A Quadrotor simulation that is performed in MATLAB and SIMULINK
💻 MDL
📖 第 1 页 / 共 3 页
字号:
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
      SFunctionDeploymentMode off
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      "FromPortIcon"
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      off
      CheckFcnCallInpInsideContextMsg off
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      CollapseMode	      "All dimensions"
      CollapseDim	      "1"
      InputSameDT	      on
      AccumDataTypeStr	      "Inherit: Inherit via internal rule"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Same as first input"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Switch
      Criteria		      "u2 >= Threshold"
      Threshold		      "0"
      InputSameDT	      on
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Inherit via internal rule"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      ZeroOrderHold
      SampleTime	      "1"
    }
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      SamplingMode	      "Sample based"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "fixdt(1,16,0)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Inherit from 'Constant value'"
      SampleTime	      "inf"
      FramePeriod	      "inf"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "quadrotorsim"
    Location		    [522, 153, 1478, 694]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Autopilot"
      Ports		      [2, 1]
      Position		      [370, 221, 455, 279]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      MaskDisplay	      "image(imread('kestrel.jpg'))"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Autopilot"
	Location		[1024, 303, 1592, 825]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "commands"
	  Position		  [85, 273, 115, 287]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Inport
	  Name			  "x"
	  Position		  [85, 343, 115, 357]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  MATLABFcn
	  Name			  "Autopilot"
	  Ports			  [1, 1]
	  Position		  [240, 265, 300, 295]
	  MATLABFcn		  "autopilot(u,C)"
	  OutputDimensions	  "4+12+12"
	  SampleTime		  "C.Ts"
	}
	Block {
	  BlockType		  Clock
	  Name			  "Clock"
	  Position		  [90, 200, 110, 220]
	  Decimation		  "10"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 3]
	  Position		  [340, 142, 345, 418]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "[4;12; 12]"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto"
	  Position		  [430, 130, 470, 160]
	  ShowName		  off
	  GotoTag		  "u"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto1"
	  Position		  [420, 265, 460, 295]
	  ShowName		  off
	  GotoTag		  "xd"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto2"
	  Position		  [425, 355, 465, 385]
	  ShowName		  off
	  GotoTag		  "xhat"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux1"
	  Ports			  [3, 1]
	  Position		  [180, 177, 185, 383]
	  ShowName		  off
	  Inputs		  "3"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Outport
	  Name			  "u"
	  Position		  [435, 183, 465, 197]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  DstBlock		  "Goto2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux1"
	  SrcPort		  1
	  DstBlock		  "Autopilot"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  "Goto1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [0, 0; 30, 0]
	  Branch {
	    Points		    [0, -45]
	    DstBlock		    "Goto"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "u"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Autopilot"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Clock"
	  SrcPort		  1
	  DstBlock		  "Mux1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "x"
	  SrcPort		  1
	  DstBlock		  "Mux1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "commands"
	  SrcPort		  1
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
	Annotation {
	  Name			  "Quadrotor Autopilot System"
	  Position		  [268, 50]
	  ForegroundColor	  "blue"
	  FontName		  "Arial"
	  FontSize		  12
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [50, 435, 80, 465]
      Value		      "0"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Constant
      Name		      "Constant1"
      Position		      [230, 330, 260, 360]
      Orientation	      "up"
      ShowName		      off
      Value		      "-1"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Display
      Name		      "Estimation Error"
      Ports		      [1]
      Position		      [795, 160, 885, 190]
      Decimation	      "1"
      Lockdown		      off
    }
    Block {
      BlockType		      Goto
      Name		      "Goto"
      Position		      [360, 150, 400, 180]
      ShowName		      off
      GotoTag		      "target"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Reference
      Name		      "Manual Switch"
      Ports		      [2, 1]
      Position		      [150, 57, 180, 93]
      ShowName		      off
      SourceBlock	      "simulink/Signal\nRouting/Manual Switch"
      SourceType	      "Manual Switch"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      sw		      "1"
      action		      "0"
      varsize		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Manual Switch1"
      Ports		      [2, 1]
      Position		      [150, 162, 180, 198]
      ShowName		      off
      SourceBlock	      "simulink/Signal\nRouting/Manual Switch"
      SourceType	      "Manual Switch"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      sw		      "1"
      action		      "0"
      varsize		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Manual Switch2"
      Ports		      [2, 1]
      Position		      [155, 267, 185, 303]
      ShowName		      off
      SourceBlock	      "simulink/Signal\nRouting/Manual Switch"
      SourceType	      "Manual Switch"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      sw		      "1"
      action		      "0"
      varsize		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Manual Switch3"
      Ports		      [2, 1]
      Position		      [155, 372, 185, 408]
      ShowName		      off
      SourceBlock	      "simulink/Signal\nRouting/Manual Switch"
      SourceType	      "Manual Switch"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      sw		      "1"
      action		      "0"
      varsize		      off
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Ports		      [4, 1]
      Position		      [300, 22, 305, 443]
      ShowName		      off
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Quadrotor"
      Ports		      [1, 1]
      Position		      [500, 222, 590, 278]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      MaskDisplay	      "image(imread('quadrotor.jpg'))"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Quadrotor"
	Location		[1114, 82, 1664, 529]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "u"
	  Position		  [65, 113, 95, 127]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Dynamics"
	  Ports			  [1, 1]
	  Position		  [200, 200, 300, 230]
	  FunctionName		  "quadrotor_dynamics"
	  Parameters		  "C"
	  EnableBusSupport	  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "East wind"
	  Position		  [65, 295, 95, 325]
	  Value			  "0"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto"
	  Position		  [375, 245, 415, 275]
	  GotoTag		  "x"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [3, 1]
	  Position		  [155, 72, 160, 358]
	  ShowName		  off
	  Inputs		  "3"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Constant
	  Name			  "North wind"
	  Position		  [65, 200, 95, 230]
	  Value			  "0"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "x"
	  Position		  [385, 208, 415, 222]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Line {
	  SrcBlock		  "East wind"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "North wind"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "u"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "Dynamics"
	  DstPort		  1
	}
	Line {

⌨️ 快捷键说明

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