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

📄 svpwm.mdl

📁 实现了SVPWM,已经通过测试,是初学者一个很好的例子
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	}
	Line {
	  Name			  "Ualpha"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "Ualpha"
	  DstPort		  1
	}
	Line {
	  Name			  "Ubeta"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  3
	  DstBlock		  "Ubeta"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Embedded\nMATLAB Function2"
      Ports		      [3, 2]
      Position		      [270, 636, 340, 684]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      MaskType		      "Stateflow"
      MaskDescription	      "Embedded MATLAB block"
      MaskDisplay	      "disp('fcn');"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Embedded\nMATLAB Function2"
	Location		[257, 457, 812, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Ua"
	  Position		  [20, 101, 40, 119]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Ub"
	  Position		  [20, 136, 40, 154]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Uc"
	  Position		  [20, 171, 40, 189]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Demux
	  Name			  " Demux "
	  Ports			  [1, 1]
	  Position		  [270, 180, 320, 220]
	  Outputs		  "1"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  " SFunction "
	  Tag			  "Stateflow S-Function svpwm12345 1"
	  Ports			  [3, 3]
	  Position		  [180, 100, 230, 180]
	  FunctionName		  "sf_sfun"
	  PortCounts		  "[3 3]"
	  Port {
	    PortNumber		    2
	    Name		    "Ualpha"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    3
	    Name		    "Ubeta"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  " Terminator "
	  Position		  [460, 191, 480, 209]
	}
	Block {
	  BlockType		  Outport
	  Name			  "Ualpha"
	  Position		  [460, 101, 480, 119]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "Ubeta"
	  Position		  [460, 136, 480, 154]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  1
	  Points		  [20, 0]
	  DstBlock		  " Demux "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  " Demux "
	  SrcPort		  1
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ua"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Ub"
	  SrcPort		  1
	  Points		  [120, 0]
	  DstBlock		  " SFunction "
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Uc"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  3
	}
	Line {
	  Name			  "Ualpha"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "Ualpha"
	  DstPort		  1
	}
	Line {
	  Name			  "Ubeta"
	  Labels		  [0, 0]
	  SrcBlock		  " SFunction "
	  SrcPort		  3
	  DstBlock		  "Ubeta"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Isabc1"
      Ports		      [1]
      Position		      [1130, 419, 1160, 451]
      Floating		      off
      Location		      [6, 43, 1030, 737]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "-50"
      YMax		      "800"
      SaveName		      "ScopeData5"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Isabc2"
      Ports		      [3]
      Position		      [1155, 514, 1185, 546]
      Floating		      off
      Location		      [6, 43, 1031, 737]
      Open		      off
      NumInputPorts	      "3"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
      }
      YMin		      "-5~-5~-5"
      YMax		      "5~5~5"
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [3, 1]
      Position		      [265, 156, 270, 194]
      ShowName		      off
      Inputs		      "3"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Reference
      Name		      "Permanent Magnet\nSynchronous Machine"
      Ports		      [1, 1, 0, 0, 0, 3]
      Position		      [875, 588, 960, 662]
      FontSize		      11
      SourceBlock	      "powerlib/Machines/Permanent Magnet\nSynchronous"
" Machine"
      SourceType	      "Permanent Magnet Synchronous Machine"
      ShowPortLabels	      on
      FluxDistribution	      "Sinusoidal"
      MechanicalLoad	      "Torque Tm"
      PresetModel	      "01:  0.8 Nm 300 Vdc 3000 RPM - 0.8 Nm"
      ShowDetailedParameters  on
      Resistance	      "18.7"
      Inductance	      "8.5e-3"
      dqInductances	      "[0.02682 0.02682]"
      Flux		      "0.1717"
      Flat		      "120"
      Mechanical	      "[2.26e-005 1.349e-005 2]"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [1]
      Position		      [280, 83, 310, 117]
      Floating		      off
      Location		      [6, 54, 1030, 741]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      TimeRange		      "0.07000000000000001"
      YMin		      "-100"
      YMax		      "100"
      SaveToWorkspace	      on
      SaveName		      "ScopeData14"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope3"
      Ports		      [1]
      Position		      [320, 158, 350, 192]
      Floating		      off
      Location		      [6, 54, 1030, 741]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      TimeRange		      "0.07000000000000001"
      YMin		      "-100"
      YMax		      "100"
      SaveToWorkspace	      on
      SaveName		      "ScopeData13"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wavea"
      Ports		      [0, 1]
      Position		      [175, 210, 205, 240]
      SineType		      "Time based"
      Amplitude		      "100"
      Frequency		      "30*2*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wavea1"
      Ports		      [0, 1]
      Position		      [150, 590, 180, 620]
      SineType		      "Time based"
      Amplitude		      "220*sqrt(2)"
      Frequency		      "100*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Waveb"
      Ports		      [0, 1]
      Position		      [175, 265, 205, 295]
      SineType		      "Time based"
      Amplitude		      "100"
      Frequency		      "30*2*pi"
      Phase		      "-2/3*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Waveb1"
      Ports		      [0, 1]
      Position		      [150, 645, 180, 675]
      SineType		      "Time based"
      Amplitude		      "220*sqrt(2)"
      Frequency		      "100*pi"
      Phase		      "-2/3*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wavec"
      Ports		      [0, 1]
      Position		      [175, 315, 205, 345]
      SineType		      "Time based"
      Amplitude		      "100"
      Frequency		      "30*2*pi"
      Phase		      "2/3*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wavec1"
      Ports		      [0, 1]
      Position		      [150, 700, 180, 730]
      SineType		      "Time based"
      Amplitude		      "220*sqrt(2)"
      Frequency		      "100*pi"
      Phase		      "2/3*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Step
      Name		      "Step"
      Position		      [810, 550, 840, 580]
      Time		      "0.04"
      After		      "0.5"
      SampleTime	      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem1"
      Ports		      [2, 8]
      Position		      [380, 589, 505, 726]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      System {
	Name			"Subsystem1"
	Location		[2, 82, 1270, 973]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Ualfa"
	  Position		  [190, 453, 220, 467]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Ubeta"
	  Position		  [190, 493, 220, 507]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [190, 640, 220, 670]
	  Value			  "300"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [195, 535, 225, 565]
	  Value			  "0.0002"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "N1"
	  Ports			  [2, 1]
	  Position		  [350, 442, 390, 518]
	  TreatAsAtomicUnit	  off
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  MaskHideContents	  off
	  System {
	    Name		    "N1"
	    Location		    [2, 82, 1014, 721]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Ualfa"
	      Position		      [25, 358, 55, 372]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Ubeta"
	      Position		      [55, 83, 85, 97]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant"
	      Position		      [175, 25, 205, 55]
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant1"
	      Position		      [165, 460, 195, 490]
	      Value		      "0"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [85, 210, 115, 240]
	      Gain		      "1.732"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain1"
	      Position		      [90, 375, 120, 405]
	      Gain		      "-1.732"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain2"
	      Position		      [315, 190, 345, 220]
	      Gain		      "2"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain3"
	      Position		      [325, 355, 355, 385]
	      Gain		      "4"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [150, 177, 185, 233]
	      ShowName		      off
	      Inputs		      "|-+"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum1"
	      Ports		      [2, 1]
	      Position		      [150, 342, 185, 398]
	      ShowName		      off

⌨️ 快捷键说明

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