ipclimpulse3.mdl

来自「倒立摆的仿真, 使用matlab7.1去写mdl file and m-file」· MDL 代码 · 共 579 行 · 第 1/2 页

MDL
579
字号
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Gain
      Name		      "Feedback Gain"
      Position		      [245, 275, 315, 305]
      Orientation	      "left"
      NamePlacement	      "alternate"
      FontName		      "Verdana"
      Gain		      "2.8648"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Impulse \nDisturbance"
      Ports		      [0, 1]
      Position		      [553, 80, 597, 120]
      Orientation	      "down"
      NamePlacement	      "alternate"
      FontName		      "Verdana"
      TreatAsAtomicUnit	      off
      MaskType		      "Impulse Generator"
      MaskDescription	      "This model generates an impulse of specified wi"
"dth."
      MaskHelp		      "This model generates an impulse of specified wi"
"dth."
      MaskPromptString	      "Impulse Time|Impulse Duration"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "T=@1;dt=@2;"
      MaskDisplay	      "plot(0,0,9,3,[1 2 3 4 4 4 5 6 7],[1 1 1 1 2 1 1"
" 1 1])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "0.5|0.01"
      System {
	Name			"Impulse \nDisturbance"
	Location		[287, 103, 462, 240]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Step
	  Name			  "Step"
	  Position		  [25, 25, 55, 55]
	  FontName		  "Verdana"
	  Time			  "T"
	  After			  "1 / dt"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Step
	  Name			  "Step1"
	  Position		  [25, 80, 55, 110]
	  FontName		  "Verdana"
	  Time			  "T + dt"
	  After			  "1 / dt"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [75, 30, 95, 50]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Impulse"
	  Position		  [120, 33, 150, 47]
	  FontName		  "Verdana"
	}
	Line {
	  SrcBlock		  "Step"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Step1"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Impulse"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Gain
      Name		      "Kc"
      Position		      [115, 159, 160, 191]
      FontName		      "Verdana"
      Gain		      "80"
    }
    Block {
      BlockType		      Reference
      Name		      "PID Controller"
      Ports		      [1, 1]
      Position		      [200, 160, 230, 190]
      FontName		      "Verdana"
      SourceBlock	      "simulink_extras/Additional\nLinear/PID Controll"
"er"
      SourceType	      "PID Controller"
      P			      "20"
      I			      "100"
      D			      "1"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "PLANT\n(Cart + IP)"
      Position		      [420, 153, 520, 197]
      FontName		      "Verdana"
      Numerator		      "[0 0 0.102]"
      Denominator	      "[0.0446 0 -1]"
    }
    Block {
      BlockType		      Constant
      Name		      "Reference\nPosition"
      Position		      [15, 160, 45, 190]
      FontName		      "Verdana"
      Value		      "0"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "SERVOMECHANISM\n(Motor + Pulley-Chain \nMechani"
"sm)"
      Position		      [290, 157, 350, 193]
      FontName		      "Verdana"
      Numerator		      "[0.391 0]"
      Denominator	      "[0.5 1]"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [75, 165, 95, 185]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [550, 165, 570, 185]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
    }
    Block {
      BlockType		      Scope
      Name		      "Theta\n(Angle from \nthe Vertical)"
      Ports		      [1]
      Position		      [610, 159, 640, 191]
      FontName		      "Verdana"
      Location		      [29, 321, 353, 559]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      SaveToWorkspace	      on
      SaveName		      "stepr"
      DataFormat	      "Array"
      MaxDataPoints	      "30000"
    }
    Line {
      SrcBlock		      "PID Controller"
      SrcPort		      1
      DstBlock		      "SERVOMECHANISM\n(Motor + Pulley-Chain \nMechani"
"sm)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Kc"
      SrcPort		      1
      DstBlock		      "PID Controller"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Feedback Gain"
      SrcPort		      1
      Points		      [-155, 0]
      DstBlock		      "Sum"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Kc"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Reference\nPosition"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      1
    }
    Line {
      SrcBlock		      "PLANT\n(Cart + IP)"
      SrcPort		      1
      DstBlock		      "Sum1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	DstBlock		"Theta\n(Angle from \nthe Vertical)"
	DstPort			1
      }
      Branch {
	Points			[0, 115]
	DstBlock		"Feedback Gain"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "SERVOMECHANISM\n(Motor + Pulley-Chain \nMechani"
"sm)"
      SrcPort		      1
      DstBlock		      "PLANT\n(Cart + IP)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Impulse \nDisturbance"
      SrcPort		      1
      Points		      [0, 75]
      DstBlock		      "Sum1"
      DstPort		      2
    }
    Annotation {
      Name		      "Force on\nthe Cart"
      Position		      [383, 154]
      FontName		      "Verdana"
    }
    Annotation {
      Name		      "Response to Disturbance in Position of Inverted"
" Broom of Compensated Inverted Pendulum System"
      Position		      [341, 41]
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      11
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "This model shows the response to disturbance in"
" Position of Inverted \nBroom of compensated Inverted Pendulum System. It sho"
"ws that how \nthe system rejects the disturbance in the position of the inver"
"ted broom."
      Position		      [319, 354]
      FontName		      "Arial"
      FontSize		      12
    }
  }
}

⌨️ 快捷键说明

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