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

📄 svpwm.mdl

📁 永磁同步电动机的空间矢量控制simulink源代码
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		3
	Name			"wm (RPM)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		4
	Name			"Vab (Vrms)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		5
	Name			"Freq (Hz)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		6
	Name			"Te (N-m)"
	PropagatedSignals	"Electromagnetic torque Te (N*m)"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      System {
	Name			"Signals"
	Location		[2, 78, 1014, 725]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Gain
	  Name			  "->RPM"
	  Position		  [320, 245, 350, 275]
	  Gain			  "30/pi"
	  ParameterDataType	  "sfix(16)"
	  ParameterScaling	  "2^0"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Gain
	  Name			  "->rms"
	  Position		  [625, 120, 655, 150]
	  Gain			  "1/sqrt(2)"
	  ParameterDataType	  "sfix(16)"
	  ParameterScaling	  "2^0"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  BusSelector
	  Name			  "Bus\nSelector"
	  Ports			  [1, 3]
	  Position		  [145, 251, 150, 309]
	  ShowName		  off
	  OutputSignals		  "Rotor speed wm (rad/s),Electromagnetic torque Te (N*m),Rotor angle thetam (rad)"
	  Port {
	    PortNumber		    1
	    Name		    "<Rotor speed wm (rad/s)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    2
	    Name		    "<Electromagnetic torque Te (N*m)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	  Port {
	    PortNumber		    3
	    Name		    "<Rotor angle thetam (rad)>"
	    RTWStorageClass	    "Auto"
	    DataLoggingNameMode	    "SignalName"
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Discrete\nPLL-Driven\n Fundamental Value"
	  Ports			  [3, 2]
	  Position		  [515, 112, 590, 198]
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskType		  "Discrete PLL-Driven Fundamental Value"
	  MaskDescription	  "This discrete block computes the fundamental value of the input signal (port In) over a running window of one cycle of a specified fundamental frequency (port Freq). Input port \"Sin_Cos\" (a two-dimension signal) provides the reference frame required for the computation.. \n First and second outputs return respectively the magnitude and phase (in degrees relative to the PLL phase) of the fundamental.\nFor the first cycle of simulation, the ouputs are held constant to the values specified by the parameter \"Initial input\"."
	  MaskPromptString	  "Initial fundamental frequency (Hz):|Initial input: [ Mag  Phase-relative-to-PLL(degrees) ]|Sample time:"
	  MaskStyleString	  "edit,edit,edit"
	  MaskTunableValueString  "on,on,on"
	  MaskCallbackString	  "||"
	  MaskEnableString	  "on,on,on"
	  MaskVisibilityString	  "on,on,on"
	  MaskToolTipString	  "on,on,on"
	  MaskVarAliasString	  ",,"
	  MaskVariables		  "Finit=@1;Par_Init=@2;Ts=@3;"
	  MaskInitialization	  "Real_Init=Par_Init(1)*cos(pi/180*Par_Init(2));\nImag_Init=Par_Init(1)*sin(pi/180*Par_Init(2));\n\n\n"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "60|[220*sqrt(2) 0]|Ts*20"
	  MaskTabNameString	  ",,"
	  System {
	    Name		    "Discrete\nPLL-Driven\n Fundamental Value"
	    Location		    [60, 171, 882, 542]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Freq"
	      Position		      [70, 133, 100, 147]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Sin_Cos"
	      Position		      [75, 228, 105, 242]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "In"
	      Position		      [75, 188, 105, 202]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Demux
	      Name		      "Demux"
	      Ports		      [1, 2]
	      Position		      [310, 196, 315, 234]
	      BackgroundColor	      "black"
	      ShowName		      off
	      Outputs		      "2"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Discrete\nVariable Frequency\nMean value1"
	      Ports		      [2, 1]
	      Position		      [400, 123, 460, 192]
	      NamePlacement	      "alternate"
	      DialogController	      "POWERSYS.PowerSysDialog"
	      SourceBlock	      "powerlib_extras/Discrete\nMeasurements/Discrete\nVariable Frequency\nMean value"
	      SourceType	      "Discrete Variable-Frequency Mean Value"
	      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"
	      Finit		      "Finit"
	      Fmin		      "20"
	      Vinit		      "Real_Init"
	      Ts		      "Ts"
	      Port {
		PortNumber		1
		Name			"Real"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Discrete\nVariable Frequency\nMean value2"
	      Ports		      [2, 1]
	      Position		      [400, 238, 460, 307]
	      DialogController	      "POWERSYS.PowerSysDialog"
	      SourceBlock	      "powerlib_extras/Discrete\nMeasurements/Discrete\nVariable Frequency\nMean value"
	      SourceType	      "Discrete Variable-Frequency Mean Value"
	      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"
	      Finit		      "Finit"
	      Fmin		      "20"
	      Vinit		      "Imag_Init"
	      Ts		      "Ts"
	      Port {
		PortNumber		1
		Name			"Imag"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn3"
	      Position		      [570, 183, 690, 207]
	      ShowName		      off
	      Expr		      "sqrt(u[1]*u[1]+u[2]*u[2])"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn4"
	      Position		      [570, 233, 710, 257]
	      ShowName		      off
	      Expr		      "atan2(u[2]+1e-6,u[1])*180/pi"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain1"
	      Position		      [165, 219, 195, 251]
	      ShowName		      off
	      Gain		      "2"
	      ParameterDataType	      "sfix(16)"
	      ParameterScaling	      "2^0"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux1"
	      Ports		      [2, 1]
	      Position		      [515, 175, 520, 250]
	      ShowName		      off
	      Inputs		      "2"
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product"
	      Ports		      [2, 1]
	      Position		      [235, 175, 270, 255]
	      CollapseMode	      "All dimensions"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      RndMeth		      "Floor"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Mag"
	      Position		      [735, 188, 765, 202]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Phase"
	      Position		      [740, 238, 770, 252]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "Mux1"
	      SrcPort		      1
	      Points		      [25, 0]
	      Branch {
		Points			[0, -20]
		DstBlock		"Fcn3"
		DstPort			1
	      }
	      Branch {
		Points			[0, 30]
		DstBlock		"Fcn4"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Fcn3"
	      SrcPort		      1
	      DstBlock		      "Mag"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Fcn4"
	      SrcPort		      1
	      DstBlock		      "Phase"
	      DstPort		      1
	    }
	    Line {
	      Name		      "Imag"
	      Labels		      [0, 0]
	      SrcBlock		      "Discrete\nVariable Frequency\nMean value2"
	      SrcPort		      1
	      Points		      [35, 0]
	      DstBlock		      "Mux1"
	      DstPort		      2
	    }
	    Line {
	      Name		      "Real"
	      Labels		      [0, 0]
	      SrcBlock		      "Discrete\nVariable Frequency\nMean value1"
	      SrcPort		      1
	      Points		      [35, 0]
	      DstBlock		      "Mux1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Demux"
	      SrcPort		      1
	      Points		      [25, 0; 0, -30]
	      DstBlock		      "Discrete\nVariable Frequency\nMean value1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Gain1"
	      SrcPort		      1
	      DstBlock		      "Product"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Product"
	      SrcPort		      1
	      DstBlock		      "Demux"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Demux"
	      SrcPort		      2
	      Points		      [30, 0; 0, 65]
	      DstBlock		      "Discrete\nVariable Frequency\nMean value2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Freq"
	      SrcPort		      1
	      Points		      [265, 0]
	      Branch {
		Points			[0, 115]
		DstBlock		"Discrete\nVariable Frequency\nMean value2"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Discrete\nVariable Frequency\nMean value1"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Sin_Cos"
	      SrcPort		      1
	      DstBlock		      "Gain1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In"
	      SrcPort		      1
	      DstBlock		      "Product"
	      DstPort		      1
	    }
	    Annotation {
	      Name		      "Discrete PLL-Driven Fundamental Value"
	      Position		      [161, 28]
	      FontSize		      12
	      FontWeight	      "bold"
	    }
	    Annotation {
	      Name		      "Pierre Giroux, Gilbert Sybille\nPower System Simulation Laboratory\nIREQ, Hydro-Quebec"
	      Position		      [147, 61]
	    }
	  }
	}
	Block {
	  BlockType		  Reference
	  Name			  "Discrete \n2nd-Order\nFilter1"
	  Ports			  [1, 1]
	  Position		  [200, 69, 250, 111]
	  DialogController	  "POWERSYS.PowerSysDialog"
	  SourceBlock		  "powerlib_extras/Discrete \nControl Blocks/Discrete \n2nd-Order\nFilter"
	  SourceType		  "Discrete 2nd-Order Filter"
	  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"
	  FilterType		  "Lowpass"
	  Fo			  "2000"
	  Zeta			  "0.707"
	  Ts			  "Ts"
	  Initialize		  on
	  Vac_Init		  "[1 30 60]"
	  Vdc_Init		  "0"
	  PlotResponse		  off
	  param1		  "[1 500 1]"
	}
	Block {
	  BlockType		  From
	  Name			  "From"
	  Position		  [45, 77, 115, 103]
	  ShowName		  off
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "Vabc_Stator"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  From
	  Name			  "From1"
	  Position		  [55, 192, 125, 218]
	  ShowName		  off
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "Iabc_Stator"
	  TagVisibility		  "global"
	}
	Block {
	  BlockType		  From
	  Name			  "From3"
	  Position		  [70, 256, 110, 284]
	  ShowName		  off
	  CloseFcn		  "tagdialog Close"
	  GotoTag		  "m"
	  TagVisibility		  "global"

⌨️ 快捷键说明

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