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

📄 chap9_7.mdl

📁 该程序是由matlab语言针对<先进PID控制及其MATLAB仿真>编写的,希望对大家有用.
💻 MDL
字号:
Model {
  Name			  "chap9_7"
  Version		  3.00
  SimParamPage		  "Solver"
  SampleTimeColors	  on
  InvariantConstants	  off
  WideVectorLines	  on
  ShowLineWidths	  on
  ShowPortDataTypes	  off
  StartTime		  "0.0"
  StopTime		  "10"
  SolverMode		  "Auto"
  Solver		  "ode45"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  Refine		  "1"
  MaxStep		  "auto"
  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		  "Matrix"
  LimitMaxRows		  off
  MaxRows		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  IntegerOverflowMsg	  "warning"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  ConsistencyChecking	  "off"
  ZeroCross		  on
  SimulationMode	  "normal"
  BlockDataTips		  on
  BlockParametersDataTip  on
  BlockAttributesDataTip  off
  BlockPortWidthsDataTip  off
  BlockDescriptionStringDataTip	off
  BlockMaskParametersDataTip off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  BooleanDataType	  off
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "oneshot"
  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	  off
  Created		  "Mon Sep 18 10:59:00 2000"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Thu Jun 10 23:29:50 2004"
  ModelVersionFormat	  "1.%<AutoIncrement:254>"
  ConfigurationManager	  "none"
  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		    "chap9_7"
    Location		    [7, 74, 803, 555]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "automatic"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    AutoZoom		    on
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      TransferFcn
      Name		      " "
      Position		      [435, 162, 480, 198]
      Numerator		      "[1]"
      Denominator	      "[J b]"
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace"
      Position		      [65, 198, 130, 222]
      VariableName	      "[t,r]"
      SampleTime	      "0.001"
      Interpolate	      on
      HoldFinalValue	      off
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace1"
      Position		      [65, 128, 130, 152]
      VariableName	      "[t,dr]"
      SampleTime	      "0.001"
      Interpolate	      on
      HoldFinalValue	      off
    }
    Block {
      BlockType		      FromWorkspace
      Name		      "From\nWorkspace2"
      Position		      [60, 68, 125, 92]
      VariableName	      "[t,ddr]"
      SampleTime	      "0.001"
      Interpolate	      on
      HoldFinalValue	      off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain3"
      Position		      [250, 65, 280, 95]
      Gain		      "f2"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain4"
      Position		      [250, 125, 280, 155]
      Gain		      "f1"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Integrator
      Name		      "Integrator"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [545, 195, 575, 225]
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialCondition	      "0"
      LimitOutput	      off
      UpperSaturationLimit    "inf"
      LowerSaturationLimit    "-inf"
      ShowSaturationPort      off
      ShowStatePort	      off
      AbsoluteTolerance	      "auto"
    }
    Block {
      BlockType		      Gain
      Name		      "Kd"
      Position		      [355, 195, 385, 225]
      Gain		      "kd"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Gain
      Name		      "Kp"
      Position		      [250, 195, 280, 225]
      Gain		      "kp"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Gain
      Name		      "Kv"
      Position		      [380, 280, 410, 310]
      Orientation	      "left"
      Gain		      "kv"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [645, 270, 675, 305]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "none"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [660, 181, 685, 219]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "none"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [705, 274, 735, 306]
      Floating		      off
      Location		      [5, 30, 805, 583]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      DataFormat	      "StructureWithTime"
      LimitMaxRows	      on
      MaxRows		      "50000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [705, 184, 735, 216]
      Floating		      off
      Location		      [5, 30, 805, 583]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-1.1"
      YMax		      "1.1"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      DataFormat	      "StructureWithTime"
      LimitMaxRows	      on
      MaxRows		      "50000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope2"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [705, 99, 735, 131]
      Floating		      off
      Location		      [5, 30, 805, 583]
      Open		      on
      NumInputPorts	      "1"
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-1.1"
      YMax		      "1.1"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      DataFormat	      "StructureWithTime"
      LimitMaxRows	      on
      MaxRows		      "50000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [640, 105, 660, 125]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [3, 1, 0, 0, 0]
      Position		      [385, 165, 415, 195]
      ForegroundColor	      "yellow"
      BackgroundColor	      "lightBlue"
      NamePlacement	      "alternate"
      ShowName		      off
      IconShape		      "round"
      Inputs		      "+++"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Sum
      Name		      "Sum2"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [200, 200, 220, 220]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Sum
      Name		      "Sum3"
      Ports		      [2, 1, 0, 0, 0]
      Position		      [305, 200, 325, 220]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      SaturateOnIntegerOverflow	on
    }
    Line {
      SrcBlock		      "Gain3"
      SrcPort		      1
      Points		      [115, 0]
      DstBlock		      "Sum1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum2"
      SrcPort		      1
      DstBlock		      "Kp"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Kd"
      SrcPort		      1
      DstBlock		      "Sum1"
      DstPort		      3
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      "Kv"
      SrcPort		      1
      Points		      [-60, 0]
      DstBlock		      "Sum3"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum3"
      SrcPort		      1
      DstBlock		      "Kd"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Kp"
      SrcPort		      1
      DstBlock		      "Sum3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Gain4"
      SrcPort		      1
      Points		      [85, 0]
      DstBlock		      "Sum1"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      DstBlock		      " "
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux1"
      SrcPort		      1
      DstBlock		      "Scope1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Integrator"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	Points			[0, 140; -375, 0]
	DstBlock		"Sum2"
	DstPort			2
      }
      Branch {
	Labels			[1, 0]
	Points			[50, 0]
	Branch {
	  DstBlock		  "Mux1"
	  DstPort		  2
	}
	Branch {
	  Points		  [0, -70]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
      }
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Scope2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "From\nWorkspace2"
      SrcPort		      1
      DstBlock		      "Gain3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "From\nWorkspace1"
      SrcPort		      1
      Points		      [105, 0]
      Branch {
	DstBlock		"Gain4"
	DstPort			1
      }
      Branch {
	Points			[-30, 0; 0, -80; 390, 0; 0, 220]
	DstBlock		"Mux"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "From\nWorkspace"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	DstBlock		"Sum2"
	DstPort			1
      }
      Branch {
	Points			[0, -170; 465, 0; 0, 75]
	Branch {
	  Points		  [0, 75]
	  DstBlock		  "Mux1"
	  DstPort		  1
	}
	Branch {
	  DstBlock		  "Sum"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      " "
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	Points			[30, 0; 0, 30]
	Branch {
	  DstBlock		  "Integrator"
	  DstPort		  1
	}
	Branch {
	  Points		  [0, 85]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
      }
      Branch {
	Points			[0, 115]
	DstBlock		"Kv"
	DstPort			1
      }
    }
    Annotation {
      Position		      [416, 193]
      Text		      "u"
    }
    Annotation {
      Position		      [432, 372]
      Text		      "Position Loop"
    }
    Annotation {
      Position		      [473, 304]
      Text		      "Velocity Loop"
    }
    Annotation {
      Position		      [328, 115]
      Text		      "Forward Control"
    }
    Annotation {
      Position		      [212, 192]
      Text		      "error"
    }
  }
}

⌨️ 快捷键说明

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