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

📄 xitong.mdl

📁 矢量控制系统仿真源代码
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	}
	Line {
	  SrcBlock		  "Gain3"
	  SrcPort		  1
	  Points		  [0, 0; 50, 0]
	  Branch {
	    Points		    [0, -170]
	    DstBlock		    "Add"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 120]
	    DstBlock		    "Add2"
	    DstPort		    2
	  }
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [40, 50, 70, 80]
      ShowName		      off
      Value		      "0.96"
    }
    Block {
      BlockType		      DiscreteIntegrator
      Name		      "Discrete-Time\nIntegrator"
      Ports		      [1, 1]
      Position		      [655, 189, 690, 221]
      IntegratorMethod	      "Integration: Forward Euler"
      ExternalReset	      "none"
      InitialConditionSource  "internal"
      InitialConditionMode    "State only (most efficient)"
      ICPrevOutput	      "DiscIntNeverNeededParam"
      ICPrevScaledInput	      "DiscIntNeverNeededParam"
    }
    Block {
      BlockType		      Gain
      Name		      "Gain1"
      Position		      [635, 415, 665, 445]
      Orientation	      "left"
      Gain		      "pi/30"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Mux
      Name		      "Mux1"
      Ports		      [3, 1]
      Position		      [1220, 24, 1225, 106]
      ShowName		      off
      Inputs		      "3"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "SPWM调制模块"
      Ports		      [3, 3]
      Position		      [685, 34, 785, 76]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      System {
	Name			"SPWM调制模块"
	Location		[281, 344, 763, 628]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Ua"
	  Position		  [375, 188, 405, 202]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "Ub"
	  Position		  [360, 338, 390, 352]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "Uc"
	  Position		  [385, 513, 415, 527]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [215, 130, 245, 160]
	  Value			  "2"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [200, 280, 230, 310]
	  Value			  "2"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  Position		  [225, 455, 255, 485]
	  Value			  "2"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [365, 109, 430, 141]
	  Gain			  "3000"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain2"
	  Position		  [350, 259, 415, 291]
	  Gain			  "3000"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain3"
	  Position		  [375, 434, 440, 466]
	  Gain			  "3000"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [320, 110, 350, 140]
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator1"
	  Ports			  [1, 1]
	  Position		  [305, 260, 335, 290]
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator2"
	  Ports			  [1, 1]
	  Position		  [330, 435, 360, 465]
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "Pulse\nGenerator"
	  Ports			  [0, 1]
	  Position		  [210, 83, 255, 117]
	  PulseType		  "Time based"
	  Amplitude		  "4"
	  Period		  "1/1000"
	  PulseWidth		  "50"
	  PhaseDelay		  "1/4000"
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "Pulse\nGenerator1"
	  Ports			  [0, 1]
	  Position		  [195, 233, 240, 267]
	  PulseType		  "Time based"
	  Amplitude		  "4"
	  Period		  "1/1000"
	  PulseWidth		  "50"
	  PhaseDelay		  "1/4000"
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "Pulse\nGenerator2"
	  Ports			  [0, 1]
	  Position		  [220, 408, 265, 442]
	  PulseType		  "Time based"
	  Amplitude		  "4"
	  Period		  "1/1000"
	  PulseWidth		  "50"
	  PhaseDelay		  "1/4000"
	}
	Block {
	  BlockType		  Relay
	  Name			  "Relay"
	  Position		  [490, 110, 520, 140]
	  OnSwitchValue		  "1e-4"
	  OffSwitchValue	  "1e-4"
	  OffOutputValue	  "-1"
	}
	Block {
	  BlockType		  Relay
	  Name			  "Relay1"
	  Position		  [475, 260, 505, 290]
	  OnSwitchValue		  "1e-4"
	  OffSwitchValue	  "1e-4"
	  OffOutputValue	  "-1"
	}
	Block {
	  BlockType		  Relay
	  Name			  "Relay2"
	  Position		  [500, 435, 530, 465]
	  OnSwitchValue		  "1e-4"
	  OffSwitchValue	  "1e-4"
	  OffOutputValue	  "-1"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [450, 115, 470, 135]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [435, 265, 455, 285]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [275, 75, 290, 170]
	  ShowName		  off
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum3"
	  Ports			  [2, 1]
	  Position		  [260, 225, 275, 320]
	  ShowName		  off
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum4"
	  Ports			  [2, 1]
	  Position		  [460, 440, 480, 460]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum5"
	  Ports			  [2, 1]
	  Position		  [285, 400, 300, 495]
	  ShowName		  off
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Outport
	  Name			  "pulse a"
	  Position		  [570, 118, 600, 132]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "pulse b"
	  Position		  [555, 268, 585, 282]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "pulse c"
	  Position		  [580, 443, 610, 457]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Relay"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulse\nGenerator"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum2"
	  SrcPort		  1
	  DstBlock		  "Integrator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ua"
	  SrcPort		  1
	  Points		  [50, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relay"
	  SrcPort		  1
	  DstBlock		  "pulse a"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain2"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "Relay1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator1"
	  SrcPort		  1
	  DstBlock		  "Gain2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulse\nGenerator1"
	  SrcPort		  1
	  DstBlock		  "Sum3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  DstBlock		  "Sum3"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum3"
	  SrcPort		  1
	  DstBlock		  "Integrator1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ub"
	  SrcPort		  1
	  Points		  [50, 0]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relay1"
	  SrcPort		  1
	  DstBlock		  "pulse b"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain3"
	  SrcPort		  1
	  DstBlock		  "Sum4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum4"
	  SrcPort		  1
	  DstBlock		  "Relay2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Integrator2"
	  SrcPort		  1
	  DstBlock		  "Gain3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulse\nGenerator2"
	  SrcPort		  1
	  DstBlock		  "Sum5"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant2"
	  SrcPort		  1
	  DstBlock		  "Sum5"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum5"
	  SrcPort		  1
	  DstBlock		  "Integrator2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Uc"
	  SrcPort		  1
	  Points		  [50, 0]
	  DstBlock		  "Sum4"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relay2"
	  SrcPort		  1
	  DstBlock		  "pulse c"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Speed controler1"
      Ports		      [2, 1]
      Position		      [135, 94, 195, 136]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskPromptString	      "Kp|Ki"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "Kp=@1;Ki=@2;"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "30|5"
      MaskTabNameString	      ","
      System {
	Name			"Speed controler1"
	Location		[405, 227, 903, 510]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "w*"
	  Position		  [35, 83, 65, 97]
	  Port			  "1"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Inport
	  Name			  "w"
	  Position		  [40, 138, 70, 152]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  LatchInput		  off
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [220, 65, 250, 95]
	  Gain			  "Kp"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [225, 130, 255, 160]
	  Gain			  "Ki"
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [295, 130, 325, 160]
	}
	Block {
	  BlockType		  Saturate
	  Name			  "Saturation"
	  Position		  [405, 85, 435, 115]
	  UpperLimit		  "20"
	  LowerLimit		  "-20"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [115, 102, 140, 158]
	  ShowName		  off
	  Inputs		  "|+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"

⌨️ 快捷键说明

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