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

📄 svpwm.mdl

📁 永磁同步电动机的空间矢量控制simulink源代码
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "PLL"
	  Ports			  [1, 3]
	  Position		  [340, 38, 420, 142]
	  DropShadow		  on
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskType		  "Discrete 1-phase PLL"
	  MaskDescription	  "This Phase Locked Loop (PLL) system can be used  to synchronize on a variable frequency sinusoidal signal.\n\nInput 1: Normalized input signal V(pu)\n\nOutput 1:  Measured frequency (Hz) = w/(2pi)\nOutput 2:  Ramp w.t  varying between  0 and 2*pi, synchronized on the zero-crossing (rising) of  the input signal\nOutput 3: Vector [sin(wt) cos(wt)]\n"
	  MaskPromptString	  "Initial input:[ Phase(degrees)   Frequency(Hz) ]|Regulator gains [ Kp  Ki ]|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		  "Par_Init=@1;ParK=@2;Ts=@3;"
	  MaskInitialization	  "Kp=ParK(1);\nKi=ParK(2);\nPhase_Init=Par_Init(1);\nFinit=Par_Init(2);"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "[27.52 60]|[120 2800]|Ts*20"
	  MaskTabNameString	  ",,"
	  System {
	    Name		    "PLL"
	    Location		    [555, 204, 1441, 744]
	    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		      "V(pu)"
	      Position		      [50, 233, 80, 247]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant4"
	      Position		      [455, 275, 485, 295]
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Value		      "2*pi"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Discrete\nPI Controller"
	      Ports		      [1, 1]
	      Position		      [310, 222, 355, 268]
	      DialogController	      "POWERSYS.PowerSysDialog"
	      SourceBlock	      "powerlib_extras/Discrete \nControl Blocks/Discrete\nPI Controller"
	      SourceType	      "Discrete PI Controller"
	      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"
	      Kp		      "Kp"
	      Ki		      "Ki"
	      Par_Limits	      "[4  0.25]*2*pi*Finit"
	      Init		      "2*pi*Finit"
	      Ts		      "Ts"
	      Port {
		PortNumber		1
		Name			"W"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Discrete\nRate Limiter"
	      Ports		      [1, 1]
	      Position		      [525, 121, 575, 169]
	      DialogController	      "POWERSYS.PowerSysDialog"
	      SourceBlock	      "powerlib_extras/Discrete \nControl Blocks/Discrete\nRate Limiter"
	      SourceType	      "Discrete Rate Limiter"
	      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"
	      R			      "30"
	      F			      "-30"
	      Vinit		      "Finit"
	      Ts		      "Ts"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Discrete\nVariable Frequency\nMean value"
	      Ports		      [2, 1]
	      Position		      [205, 208, 265, 277]
	      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		      "10"
	      Vinit		      "0"
	      Ts		      "Ts"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Discrete \n2nd-Order\nFilter"
	      Ports		      [1, 1]
	      Position		      [610, 114, 665, 176]
	      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		      "25"
	      Zeta		      "0.707"
	      Ts		      "Ts"
	      Initialize	      on
	      Vac_Init		      "[0 0  Finit]"
	      Vdc_Init		      "Finit"
	      PlotResponse	      off
	      param1		      "[1 500 0.1]"
	    }
	    Block {
	      BlockType		      DiscreteIntegrator
	      Name		      "Discrete-Time\nIntegrator"
	      Ports		      [1, 1]
	      Position		      [425, 227, 465, 263]
	      ShowName		      off
	      IntegratorMethod	      "Integration: Forward Euler"
	      ExternalReset	      "none"
	      InitialConditionSource  "internal"
	      InitialCondition	      "Phase_Init*pi/180"
	      SampleTime	      "Ts"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      UpperSaturationLimit    "0"
	      LowerSaturationLimit    "0"
	      ICPrevOutput	      "DiscIntNeverNeededParam"
	      ICPrevScaledInput	      "DiscIntNeverNeededParam"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain10"
	      Position		      [430, 128, 485, 162]
	      ShowName		      off
	      Gain		      "1/2/pi"
	      ParameterDataType	      "sfix(16)"
	      ParameterScaling	      "2^0"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Math
	      Name		      "Math\nFunction"
	      Ports		      [2, 1]
	      Position		      [520, 225, 550, 305]
	      ShowName		      off
	      Operator		      "mod"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux1"
	      Ports		      [2, 1]
	      Position		      [695, 248, 700, 317]
	      ShowName		      off
	      Inputs		      "2"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      Product
	      Name		      "Product1"
	      Ports		      [2, 1]
	      Position		      [130, 221, 160, 294]
	      ShowName		      off
	      CollapseMode	      "All dimensions"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      RndMeth		      "Floor"
	    }
	    Block {
	      BlockType		      Trigonometry
	      Name		      "Trigonometric\nFunction5"
	      Ports		      [1, 1]
	      Position		      [630, 289, 660, 311]
	      NamePlacement	      "alternate"
	      ShowName		      off
	      Operator		      "cos"
	    }
	    Block {
	      BlockType		      Trigonometry
	      Name		      "Trigonometric\nFunction6"
	      Ports		      [1, 1]
	      Position		      [630, 254, 660, 276]
	      NamePlacement	      "alternate"
	      ShowName		      off
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay1"
	      Position		      [700, 135, 720, 155]
	      ShowName		      off
	      X0		      "Finit"
	      SampleTime	      "Ts"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Freq"
	      Position		      [780, 138, 810, 152]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "wt"
	      Position		      [775, 213, 805, 227]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Sin_Cos"
	      Position		      [770, 278, 800, 292]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "Unit Delay1"
	      SrcPort		      1
	      Points		      [25, 0]
	      Branch {
		Points			[0, -40; -575, 0; 0, 120]
		DstBlock		"Discrete\nVariable Frequency\nMean value"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Freq"
		DstPort			1
	      }
	    }
	    Line {
	      Name		      "W"
	      Labels		      [0, 0]
	      SrcBlock		      "Discrete\nPI Controller"
	      SrcPort		      1
	      Points		      [40, 0]
	      Branch {
		Points			[0, -100]
		DstBlock		"Gain10"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Discrete-Time\nIntegrator"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "V(pu)"
	      SrcPort		      1
	      DstBlock		      "Product1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant4"
	      SrcPort		      1
	      DstBlock		      "Math\nFunction"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Discrete-Time\nIntegrator"
	      SrcPort		      1
	      DstBlock		      "Math\nFunction"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Product1"
	      SrcPort		      1
	      DstBlock		      "Discrete\nVariable Frequency\nMean value"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Discrete\nVariable Frequency\nMean value"
	      SrcPort		      1
	      DstBlock		      "Discrete\nPI Controller"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Mux1"
	      SrcPort		      1
	      DstBlock		      "Sin_Cos"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Math\nFunction"
	      SrcPort		      1
	      Points		      [25, 0]
	      Branch {
		DstBlock		"Trigonometric\nFunction6"
		DstPort			1
	      }
	      Branch {
		Points			[0, 35]
		DstBlock		"Trigonometric\nFunction5"
		DstPort			1
	      }
	      Branch {
		Points			[0, -45]
		DstBlock		"wt"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Trigonometric\nFunction6"
	      SrcPort		      1
	      DstBlock		      "Mux1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Trigonometric\nFunction5"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		DstBlock		"Mux1"
		DstPort			2
	      }
	      Branch {
		Points			[0, 35; -570, 0; 0, -60]
		DstBlock		"Product1"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Discrete \n2nd-Order\nFilter"
	      SrcPort		      1
	      DstBlock		      "Unit Delay1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain10"
	      SrcPort		      1
	      DstBlock		      "Discrete\nRate Limiter"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Discrete\nRate Limiter"
	      SrcPort		      1
	      DstBlock		      "Discrete \n2nd-Order\nFilter"
	      DstPort		      1
	    }
	    Annotation {
	      Name		      "Pierre Giroux, Gilbert Sybille\nPower System Laboratory, IREQ\nHydro-Quebec"
	      Position		      [100, 51]
	    }
	    Annotation {
	      Name		      "Note: sin( a ) * cos( b  )= 1/2 * sin( a+b )  + 1/2 * sin(a-b) "
	      Position		      [181, 385]
	      FontSize		      12
	    }
	    Annotation {
	      Name		      "Discrete 1-phase PLL  "
	      Position		      [109, 19]
	      FontSize		      14
	      FontWeight	      "bold"
	    }
	  }
	}
	Block {
	  BlockType		  Selector
	  Name			  "Selector"
	  Ports			  [1, 1]
	  Position		  [130, 73, 155, 107]
	  ShowName		  off
	  InputPortWidth	  "3"
	  IndexOptions		  "Index vector (dialog)"
	  Indices		  "[1]"
	  OutputSizes		  "1"
	}
	Block {
	  BlockType		  Selector
	  Name			  "Selector2"
	  Ports			  [1, 1]
	  Position		  [150, 188, 175, 222]
	  ShowName		  off
	  InputPortWidth	  "3"
	  IndexOptions		  "Index vector (dialog)"
	  Indices		  "[1]"
	  OutputSizes		  "1"
	}
	Block {
	  BlockType		  Terminator
	  Name			  "Terminator"
	  Position		  [620, 174, 635, 186]
	  ShowName		  off
	}
	Block {
	  BlockType		  Terminato

⌨️ 快捷键说明

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