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

📄 optsimpid.mdl

📁 简单倒摆控制系统的仿真
💻 MDL
📖 第 1 页 / 共 2 页
字号:
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Derivative
      LinearizePole	      "inf"
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ParameterDataTypeMode   "Same as input"
      ParameterDataType	      "sfix(16)"
      ParameterScalingMode    "Best Precision: Matrix-wise"
      ParameterScaling	      "2^0"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      LatchByDelayingOutsideSignal off
      LatchByCopyingInsideSignal off
      Interpolate	      on
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Scope
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Step
      Time		      "1"
      Before		      "0"
      After		      "1"
      SampleTime	      "-1"
      VectorParams1D	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      TransferFcn
      Numerator		      "[1]"
      Denominator	      "[1 2 1]"
      AbsoluteTolerance	      "auto"
      Realization	      "auto"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "optsimpid"
    Location		    [439, 443, 1124, 828]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "Controller"
      Ports		      [1, 1]
      Position		      [320, 89, 365, 121]
      NamePlacement	      "alternate"
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      MaskType		      "PID Controller"
      MaskDescription	      "Enter expressions for proportional, integral, a"
"nd derivative terms."
      MaskHelp		      "This block implements a PID controller where pa"
"ramaters are entered for the Proportional, Integral and Derivative terms."
      MaskPromptString	      "Proportional:|Integral|Derivative:"
      MaskStyleString	      "edit,edit,edit"
      MaskTunableValueString  "on,on,on"
      MaskCallbackString      "||"
      MaskEnableString	      "on,on,on"
      MaskVisibilityString    "on,on,on"
      MaskToolTipString	      "on,on,on"
      MaskVarAliasString      ",,"
      MaskInitialization      "P=@1; I=@2; D=@3;"
      MaskDisplay	      "disp('PID')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "Kp|Ki|Kd"
      MaskTabNameString	      ",,"
      System {
	Name			"Controller"
	Location		[0, 0, 362, 244]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In_1"
	  Position		  [25, 65, 45, 85]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Gain
	  Name			  "D"
	  Position		  [105, 129, 125, 151]
	  Gain			  "D"
	}
	Block {
	  BlockType		  Gain
	  Name			  "D1"
	  Position		  [130, 13, 150, 37]
	  Gain			  "P"
	}
	Block {
	  BlockType		  Derivative
	  Name			  "Derivative"
	  Position		  [150, 128, 190, 152]
	}
	Block {
	  BlockType		  TransferFcn
	  Name			  "I"
	  Position		  [130, 57, 165, 93]
	  Numerator		  "[I]"
	  Denominator		  "[1 0]"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [3, 1]
	  Position		  [255, 57, 275, 93]
	  Inputs		  "+++"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out_1"
	  Position		  [300, 65, 320, 85]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "In_1"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [15, 0]
	    Branch {
	      Points		      [0, -50]
	      DstBlock		      "D1"
	      DstPort		      1
	    }
	    Branch {
	      DstBlock		      "I"
	      DstPort		      1
	    }
	  }
	  Branch {
	    Points		    [0, 65]
	    DstBlock		    "D"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Out_1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "D"
	  SrcPort		  1
	  DstBlock		  "Derivative"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Derivative"
	  SrcPort		  1
	  Points		  [10, 0; 0, -55]
	  DstBlock		  "Sum"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "I"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "D1"
	  SrcPort		  1
	  Points		  [55, 0; 0, 40]
	  DstBlock		  "Sum"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Double click\non this for demo.5"
      Ports		      []
      Position		      [345, 199, 416, 235]
      ShowName		      off
      OpenFcn		      "optsiminit"
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      MaskDisplay	      "disp('optsiminit')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Double click\non this for demo.5"
	Location		[-10, 380, 117, 533]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      TransferFcn
      Name		      "Plant"
      Position		      [400, 87, 470, 123]
      NamePlacement	      "alternate"
      Denominator	      "[1 0 10]"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1]
      Position		      [515, 88, 545, 122]
      Floating		      off
      Location		      [5, 52, 1277, 761]
      Open		      off
      NumInputPorts	      "1"
      TickLabels	      "on"
      List {
	ListType		AxesTitles
	axes1			"Closed Loop Response"
      }
      TimeRange		      "100"
      YMin		      "0"
      YMax		      "1.4"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Step
      Name		      "Step"
      Position		      [220, 90, 240, 110]
      Time		      "0"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [270, 94, 285, 116]
      ShowName		      off
      Inputs		      "+-"
    }
    Block {
      BlockType		      Outport
      Name		      "Out1"
      Position		      [515, 158, 545, 172]
      IconDisplay	      "Port number"
      BusOutputAsStruct	      off
    }
    Line {
      SrcBlock		      "Plant"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	Points			[0, 60]
	Branch {
	  Points		  [-230, 0; 0, -55]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Branch {
	  Labels		  [1, 0]
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
      Branch {
	DstBlock		"Scope"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Controller"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Step"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Controller"
      SrcPort		      1
      DstBlock		      "Plant"
      DstPort		      1
    }
    Annotation {
      Name		      "Double click here to initialize plant data and "
"optimization parameters."
      Position		      [387, 252]
      UseDisplayTextAsClickCallback off
    }
    Annotation {
      Name		      "Tunable Variables are  PID gains, Kp, Ki, and K"
"d."
      Position		      [377, 57]
      UseDisplayTextAsClickCallback off
    }
  }
}

⌨️ 快捷键说明

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