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

📄 ipclimpulse1.mdl

📁 Simulink for Inverted pendulum.
💻 MDL
字号:
Model {
  Name			  "ipclimpulse"
  Version		  4.00
  SampleTimeColors	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  ShowStorageClass	  off
  ExecutionOrder	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  Created		  "Thu May 29 08:05:16 2003"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Tue Jun 03 18:43:33 2003"
  ModelVersionFormat	  "1.%<AutoIncrement:55>"
  ConfigurationManager	  "None"
  SimParamPage		  "Solver"
  StartTime		  "0.0"
  StopTime		  "5"
  SolverMode		  "Auto"
  Solver		  "ode45"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  Refine		  "1"
  MaxStep		  "auto"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  on
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  on
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Array"
  LimitDataPoints	  on
  MaxDataPoints		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  SingleTaskRateTransMsg  "none"
  MultiTaskRateTransMsg	  "error"
  IntegerOverflowMsg	  "warning"
  CheckForMatrixSingularity "none"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  InvalidFcnCallConnMsg	  "error"
  SignalLabelMismatchMsg  "none"
  LinearizationMsg	  "none"
  VectorMatrixConversionMsg "none"
  SfunCompatibilityCheckMsg "none"
  BlockPriorityViolationMsg "warning"
  ArrayBoundsChecking	  "none"
  ConsistencyChecking	  "none"
  ZeroCross		  on
  Profile		  off
  SimulationMode	  "normal"
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  ParameterPooling	  on
  BlockReductionOpt	  on
  RTWExpressionDepthLimit 5
  BooleanDataType	  off
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "ipclimpulse"
    Location		    [134, 116, 793, 490]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "automatic"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Gain
      Name		      "Feedback"
      Position		      [255, 220, 325, 250]
      Orientation	      "left"
      NamePlacement	      "alternate"
      FontName		      "Verdana"
      Gain		      "2.8648"
      Multiplication	      "Element-wise(K.*u)"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      SubSystem
      Name		      "Impulse \nGenerator"
      Ports		      [0, 1]
      Position		      [20, 100, 60, 140]
      FontName		      "Verdana"
      ShowPortLabels	      on
      TreatAsAtomicUnit	      off
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      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"
      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"
      MaskVariableAliases     ","
      System {
	Name			"Impulse \nGenerator"
	Location		[287, 103, 462, 240]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"automatic"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Step
	  Name			  "Step"
	  Position		  [25, 25, 55, 55]
	  FontName		  "Verdana"
	  Time			  "T"
	  Before		  "0"
	  After			  "1 / dt"
	  SampleTime		  "0"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Step
	  Name			  "Step1"
	  Position		  [25, 80, 55, 110]
	  FontName		  "Verdana"
	  Time			  "T + dt"
	  Before		  "0"
	  After			  "1 / dt"
	  SampleTime		  "0"
	  VectorParams1D	  on
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [75, 30, 95, 50]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  SaturateOnIntegerOverflow on
	}
	Block {
	  BlockType		  Outport
	  Name			  "Impulse"
	  Position		  [120, 33, 150, 47]
	  FontName		  "Verdana"
	  Port			  "1"
	  OutputWhenDisabled	  "held"
	  InitialOutput		  "[]"
	}
	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		      [125, 104, 170, 136]
      FontName		      "Verdana"
      Gain		      "30"
      Multiplication	      "Element-wise(K.*u)"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Reference
      Name		      "PID Controller"
      Ports		      [1, 1]
      Position		      [210, 105, 240, 135]
      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		      [455, 98, 555, 142]
      FontName		      "Verdana"
      Numerator		      "[0 0 0.102]"
      Denominator	      "[0.0446 0 -1]"
      AbsoluteTolerance	      "auto"
      Realization	      "auto"
    }
    Block {
      BlockType		      TransferFcn
      Name		      "SERVOMECHANISM\n(Motor + Pulley-Chain \nMechani"
"sm)"
      Position		      [300, 102, 360, 138]
      FontName		      "Verdana"
      Numerator		      "[0.391 0]"
      Denominator	      "[0.5 1]"
      AbsoluteTolerance	      "auto"
      Realization	      "auto"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [85, 110, 105, 130]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Scope
      Name		      "Theta\n(Angle from \nthe Vertical)"
      Ports		      [1]
      Position		      [600, 104, 630, 136]
      FontName		      "Verdana"
      Floating		      off
      Location		      [29, 321, 353, 559]
      Open		      off
      NumInputPorts	      "1"
      TickLabels	      "OneTimeTick"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      on
      SaveName		      "stepr"
      DataFormat	      "Array"
      LimitDataPoints	      on
      MaxDataPoints	      "30000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Line {
      SrcBlock		      "SERVOMECHANISM\n(Motor + Pulley-Chain \nMechani"
"sm)"
      SrcPort		      1
      DstBlock		      "PLANT\n(Cart + IP)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "PLANT\n(Cart + IP)"
      SrcPort		      1
      Points		      [0, 0; 10, 0]
      Branch {
	DstBlock		"Theta\n(Angle from \nthe Vertical)"
	DstPort			1
      }
      Branch {
	Points			[0, 115]
	DstBlock		"Feedback"
	DstPort			1
      }
    }
    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"
      SrcPort		      1
      Points		      [-155, 0]
      DstBlock		      "Sum"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Kc"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Impulse \nGenerator"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      1
    }
    Annotation {
      Position		      [403, 109]
      Text		      "Force on Cart"
      FontName		      "Verdana"
    }
    Annotation {
      Position		      [351, 56]
      Text		      "Closed Loop Impulse Response of Compensated Inv"
"erted Pendulum System"
      DropShadow	      on
      FontName		      "Arial"
      FontSize		      11
      FontWeight	      "bold"
    }
    Annotation {
      Position		      [334, 304]
      Text		      "This model shows the impulse response of the Co"
"mpensated Inverted Pendulum \nSystem. Here initially the Inverted Pendulum is"
" at vertical \nposition. It also shows that the system has become stable as "
"\nTheta returns back to zero, when impulse input comes."
      FontName		      "Arial"
      FontSize		      12
    }
  }
}

⌨️ 快捷键说明

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