dc_motor_control.mdl

来自「This article focuses dc motor control an」· MDL 代码 · 共 1,534 行 · 第 1/4 页

MDL
1,534
字号
      IndexMode		      "One-based"
      InputPortWidth	      "-1"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Step
      Time		      "1"
      Before		      "0"
      After		      "1"
      SampleTime	      "-1"
      VectorParams1D	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      "FromPortIcon"
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      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
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      ToWorkspace
      VariableName	      "simulink_output"
      MaxDataPoints	      "1000"
      Decimation	      "1"
      SampleTime	      "0"
      FixptAsFi		      off
    }
    Block {
      BlockType		      Terminator
    }
    Block {
      BlockType		      UnitDelay
      X0		      "0"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
    Block {
      BlockType		      ZeroOrderHold
      SampleTime	      "1"
    }
    Block {
      BlockType		      PMIOPort
    }
    Block {
      BlockType		      Abs
      ZeroCross		      on
      SampleTime	      "-1"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
    }
    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	      "[]"
      SampleTime	      "inf"
      FramePeriod	      "inf"
    }
    Block {
      BlockType		      RelationalOperator
      Operator		      ">="
      InputSameDT	      on
      LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimization)"
      LogicDataType	      "uint(8)"
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      LockScale		      off
      RndMeth		      "Floor"
    }
    Block {
      BlockType		      Sin
      SineType		      "Time based"
      TimeSource	      "Use simulation time"
      Amplitude		      "1"
      Bias		      "0"
      Frequency		      "1"
      Phase		      "0"
      Samples		      "10"
      Offset		      "0"
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    Block {
      BlockType		      Trigonometry
      Operator		      "sin"
      OutputSignalType	      "auto"
      SampleTime	      "-1"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "DC_motor_control"
    Location		    [249, 89, 1196, 456]
    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		      Reference
      Name		      "220 V  50 Hz"
      Description	      "source block"
      Ports		      [0, 0, 0, 0, 0, 1, 1]
      Position		      [50, 120, 90, 150]
      NamePlacement	      "alternate"
      AttributesFormatString  "\\n"
      DialogController	      "POWERSYS.PowerSysDialog"
      FontSize		      12
      SourceBlock	      "powerlib/Electrical\nSources/AC Voltage Source"
      SourceType	      "AC Voltage Source"
      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"
      Amplitude		      "220*sqrt(2)"
      Phase		      "0"
      Frequency		      "50"
      SampleTime	      "0"
      Measurements	      "None"
    }
    Block {
      BlockType		      Reference
      Name		      "Linear Transformer"
      Ports		      [0, 0, 0, 0, 0, 2, 2]
      Position		      [120, 120, 170, 180]
      DialogController	      "POWERSYS.PowerSysDialog"
      FontSize		      12
      SourceBlock	      "powerlib/Elements/Linear Transformer"
      SourceType	      "Linear Transformer"
      PhysicalDomain	      "powersysdomain"
      SubClassName	      "unknown"
      LeftPortType	      "p1"
      RightPortType	      "p1"
      LConnTagsString	      "a|b"
      RConnTagsString	      "A|B"
      UNITS		      "pu"
      NominalPower	      " [5e3 50]"
      winding1		      "[220 0.002 0.06]"
      winding2		      "[390 0.002 0.06]"
      ThreeWindings	      off
      winding3		      "[60e3 0.005 0.02]"
      RmLm		      "[500 500]"
      Measurements	      "None"
      DataType		      off
    }
    Block {
      BlockType		      Step
      Name		      "Load torque"
      Position		      [40, 65, 70, 95]
      NamePlacement	      "alternate"
      FontSize		      12
      Time		      "10"
      After		      "20"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [3]
      Position		      [615, 52, 670, 158]
      ShowName		      off
      FontSize		      12
      Floating		      off
      Location		      [5, 34, 1285, 785]
      Open		      off
      NumInputPorts	      "3"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
      }
      YMin		      "0~-2.5~1725"
      YMax		      "150~25~1752.5"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      Decimation	      "2"
      SampleTime	      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Selector1"
      Ports		      [3, 3]
      Position		      [425, 56, 490, 154]
      ShowName		      off
      FontSize		      12
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Port {
	PortNumber		1
	Name			"Armature voltage"
	PropagatedSignals	"Armature Voltage (V)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		2
	Name			"Armature current"
	PropagatedSignals	"Armature current ia (A), Ia* (A)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		3
	Name			"Speed"
	PropagatedSignals	"Speed (rpm), Reference"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      System {
	Name			"Selector1"
	Location		[383, 383, 731, 595]
	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			  "Motor"
	  Position		  [15, 38, 45, 52]
	  FontSize		  12
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Conv."
	  Position		  [20, 173, 50, 187]
	  FontSize		  12
	  Port			  "2"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Ctrl."
	  Position		  [20, 128, 50, 142]
	  FontSize		  12
	  Port			  "3"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  BusSelector
	  Name			  "Bus\nSelector1"
	  Ports			  [1, 3]
	  Position		  [85, 113, 90, 157]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  OutputSignals		  "Ia* (A),Alpha (deg),Reference"
	  Port {
	    PortNumber		    1
	    Name		    "<Ia* (A)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    2
	    Name		    "<Alpha (deg)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    3
	    Name		    "<Reference>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	}
	Block {
	  BlockType		  BusSelector
	  Name			  "Bus\nSelector3"
	  Ports			  [1, 3]
	  Position		  [85, 13, 90, 77]
	  ForegroundColor	  "blue"
	  ShowName		  off
	  OutputSignals		  "Armature Voltage (V),Armature current ia (A),Speed (rpm)"
	  Port {
	    PortNumber		    1
	    Name		    "<Armature Voltage (V)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    2
	    Name		    "<Armature current ia (A)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }

⌨️ 快捷键说明

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