igrun.mdl

来自「关于电机的.m程序」· MDL 代码 · 共 2,708 行 · 第 1/5 页

MDL
2,708
字号
	ListType		AxesTitles
	axes1			"Vrmag [pu]"
	axes2			"phase [o]"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
      }
      TimeRange		      "30"
      YMin		      "2.77556e-017~-200"
      YMax		      "0.65~200"
      SaveName		      "ScopeData9"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Gain
      Name		      "ab2ABC"
      Position		      [1045, 543, 1085, 587]
      Gain		      "[1 0;-0.5 sqrt(3)/2;-0.5 -sqrt(3)/2]"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      SubSystem
      Name		      "dq2ab "
      Ports		      [2, 1]
      Position		      [950, 515, 1010, 610]
      TreatAsAtomicUnit	      off
      System {
	Name			"dq2ab "
	Location		[748, 239, 1112, 452]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"90"
	Block {
	  BlockType		  Inport
	  Name			  "dq"
	  Position		  [20, 77, 50, 93]
	}
	Block {
	  BlockType		  Inport
	  Name			  "thetar"
	  Position		  [20, 112, 50, 128]
	  Port			  "2"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [150, 18, 280, 62]
	  ShowName		  off
	  Expr			  "u(1)*cos(u(3))-u(2)*sin(u(3))"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [150, 186, 285, 224]
	  ShowName		  off
	  Expr			  "u(1)*sin(u(3))+u(2)*cos(u(3))"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux3"
	  Ports			  [2, 1]
	  Position		  [125, 12, 130, 63]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux4"
	  Ports			  [2, 1]
	  Position		  [125, 177, 130, 228]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux5"
	  Ports			  [2, 1]
	  Position		  [320, 106, 325, 139]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Outport
	  Name			  "ab"
	  Position		  [350, 118, 380, 132]
	}
	Line {
	  SrcBlock		  "Mux3"
	  SrcPort		  1
	  DstBlock		  "Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux4"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "dq"
	  SrcPort		  1
	  Points		  [15, 0; 0, 0]
	  Branch {
	    Points		    [0, -60]
	    DstBlock		    "Mux3"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 105]
	    DstBlock		    "Mux4"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "thetar"
	  SrcPort		  1
	  Points		  [125, 0]
	  Branch {
	    Points		    [0, -35; -80, 0; 0, -35]
	    DstBlock		    "Mux3"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 40; -80, 0; 0, 55]
	    DstBlock		    "Mux4"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  Points		  [15, 0]
	  DstBlock		  "Mux5"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [20, 0]
	  DstBlock		  "Mux5"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux5"
	  SrcPort		  1
	  DstBlock		  "ab"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Lookup
      Name		      "gama\n[deg]"
      Position		      [65, 286, 100, 324]
      BackgroundColor	      "yellow"
      FontWeight	      "bold"
      InputValues	      "[0  50] "
      OutputValues	      "[0 0]"
    }
    Block {
      BlockType		      SubSystem
      Name		      "info"
      Ports		      []
      Position		      [27, 634, 99, 703]
      ForegroundColor	      "darkGreen"
      DropShadow	      on
      ShowName		      off
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "plot(-1.5,-1.5,1.5,1.5,cos(0:.01:7),sin(0:.01:7"
") )\ndisp('INFO')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"info"
	Location		[481, 94, 1129, 286]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "The induction machine is modeled in vectori"
"zed form in the synchronous frame  associated with the stator\nvoltage space "
"vector.\nThe  dq components of the injected rotor voltage Vr, at slip frequen"
"cy wr, are derived from PI controllers; vrd is the\noutput of a cascade arran"
"gement of speed and Ps controllers; vrq is derived from a Qs controller.\nThe"
" mechanical system is modeled as two inertias coupled by means of a flexible "
" shaft.\nThe whole system is described by parameters expressed in per unit. T"
"he machine representations are based\non the motor convention; consequently, "
"in the generator mode of operation, such quantities as Ps, Qs, Tw, Te are\nne"
"gative (with wm>0) while Pr is positive for subsynchronous operation and nega"
"tive for oversynchronous mode."
	  Position		  [15, 50]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  FontName		  "Arial"
	  FontSize		  12
	}
	Annotation {
	  Name			  "Doubly-Fed Induction Generator \ndriven by "
"a Wind Turbine  "
	  Position		  [319, 27]
	  ForegroundColor	  "blue"
	  FontSize		  12
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "ir"
      Ports		      [1]
      Position		      [1115, 628, 1145, 672]
      NamePlacement	      "alternate"
      Location		      [14, 70, 545, 356]
      Open		      on
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"dq rotor current [pu]"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "30"
      YMin		      "-2.5"
      YMax		      "2"
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "is"
      Ports		      [1]
      Position		      [1100, 148, 1130, 192]
      NamePlacement	      "alternate"
      Location		      [99, 70, 630, 356]
      Open		      on
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"Stator current [pu]"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "30"
      YMin		      "-2"
      YMax		      "2"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Gain
      Name		      "r2d"
      Position		      [705, 603, 735, 637]
      Gain		      "180/pi"
      Multiplication	      "Matrix(K*u)"
    }
    Block {
      BlockType		      SubSystem
      Name		      "shift"
      Ports		      [2, 1]
      Position		      [275, 199, 330, 246]
      TreatAsAtomicUnit	      off
      System {
	Name			"shift"
	Location		[616, 260, 1055, 487]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "vso"
	  Position		  [20, 77, 50, 93]
	}
	Block {
	  BlockType		  Inport
	  Name			  "gama"
	  Position		  [20, 112, 50, 128]
	  Port			  "2"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [150, 16, 300, 64]
	  ShowName		  off
	  Expr			  "u(1)*cos(u(3))-u(2)*sin(u(3))"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [150, 185, 310, 225]
	  ShowName		  off
	  Expr			  "u(1)*sin(u(3))+u(2)*cos(u(3))"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux3"
	  Ports			  [2, 1]
	  Position		  [125, 12, 130, 63]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux4"
	  Ports			  [2, 1]
	  Position		  [125, 177, 130, 228]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux5"
	  Ports			  [2, 1]
	  Position		  [340, 106, 345, 139]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Gain
	  Name			  "d2r"
	  Position		  [100, 103, 130, 137]
	  Gain			  "pi/180"
	  Multiplication	  "Matrix(K*u)"
	}
	Block {
	  BlockType		  Outport
	  Name			  "vs"
	  Position		  [370, 118, 400, 132]
	}
	Line {
	  SrcBlock		  "Mux5"
	  SrcPort		  1
	  DstBlock		  "vs"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [20, 0]
	  DstBlock		  "Mux5"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Mux5"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "gama"
	  SrcPort		  1
	  DstBlock		  "d2r"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "vso"
	  SrcPort		  1
	  Points		  [15, 0; 0, 0]
	  Branch {
	    Points		    [0, 105]
	    DstBlock		    "Mux4"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -60]
	    DstBlock		    "Mux3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Mux4"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux3"
	  SrcPort		  1
	  DstBlock		  "Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "d2r"
	  SrcPort		  1
	  Points		  [45, 0]
	  Branch {
	    Points		    [0, 40; -80, 0; 0, 55]
	    DstBlock		    "Mux4"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, -35; -80, 0; 0, -35]
	    DstBlock		    "Mux3"
	    DstPort		    2
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "space vector"
      Ports		      []
      Position		      [162, 635, 230, 701]
      ForegroundColor	      "orange"
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "close all,figure(1),plot(t,Tor(:,1),t,Tor(:,2),"
"'-r'),grid,title('Torque'),figure(2),plot(t,n(:,1),t,n(:,2),'-r'),grid,title("
"'Speed')"
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "plot(-1.5,-1.5,1.5,1.5,cos(0:.01:7),sin(0:.01:7"
") )\ndisp('PLOTS')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"space vector"
	Location		[81, 508, 528, 696]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      Scope
      Name		      "speed"
      Ports		      [1]
      Position		      [1045, 38, 1075, 82]
      NamePlacement	      "alternate"
      Location		      [624, 60, 1133, 355]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"Speed [pu]"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "30"
      YMin		      "0.6"
      YMax		      "1.5"
      SaveName		      "ScopeData7"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "torque"
      Ports		      [1]
      Position		      [1050, 103, 1080, 147]
      NamePlacement	      "alternate"
      Location		      [624, 393, 1147, 689]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"Torque [pu]"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "30"
      YMin		      "-2"
      YMax		      "2.25"
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Constant
      Name		      "vs"
      Position		      [30, 195, 85, 225]
      BackgroundColor	      "yellow"
      FontWeight	      "bold"
      Value		      "[1 0]"
    }
    Block {
      BlockType		      Constant
      Name		      "wk"
      Position		      [375, 245, 405, 275]
      BackgroundColor	      "yellow"
      NamePlacement	      "alternate"
      FontWeight	      "bold"
    }
    Block {
      BlockType		      Lookup
      Name		      "wm"
      Position		      [70, 441, 105, 479]
      BackgroundColor	      "yellow"
      NamePlacement	      "alternate"
      FontWeight	      "bold"
      InputValues	   

⌨️ 快捷键说明

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