swing4.mdl

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

MDL
664
字号
	}
      }
    }
    Block {
      BlockType		      Gain
      Name		      "1/2H"
      Position		      [340, 169, 390, 211]
      Gain		      "1/(2*H)"
    }
    Block {
      BlockType		      Clock
      Name		      "Clock"
      Position		      [150, 180, 170, 200]
      DisplayTime	      on
      Decimation	      "10"
    }
    Block {
      BlockType		      Gain
      Name		      "D"
      Position		      [275, 130, 315, 160]
      Orientation	      "down"
      NamePlacement	      "alternate"
      Gain		      "0.06"
    }
    Block {
      BlockType		      Fcn
      Name		      "EVsin(delta)/X"
      Position		      [330, 269, 425, 301]
      Expr		      "E*V*sin(u(2))/u(1)"
      Port {
	PortNumber		1
	Name			"Pe"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Integrator
      Name		      "Integrator"
      Ports		      [1, 1]
      Position		      [425, 19, 455, 51]
      ShowName		      off
      Port {
	PortNumber		1
	Name			"delta"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Integrator
      Name		      "Integrator1"
      Ports		      [1, 1]
      Position		      [425, 175, 455, 205]
      ShowName		      off
      Port {
	PortNumber		1
	Name			"wm"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Lookup
      Name		      "Look-Up\nTable"
      Position		      [200, 164, 250, 216]
      InputValues	      "[0 1 1 3 3 5 5 20]"
      OutputValues	      "[0 0 1 1 2.35 2.35 2.58 2.58]"
      Port {
	PortNumber		1
	Name			"Pm"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [295, 266, 300, 304]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      SubSystem
      Name		      "SubSystem"
      Ports		      []
      Position		      [15, 219, 174, 255]
      BackgroundColor	      "yellow"
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "edit(which('swing4run.m'))"
      FontSize		      12
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('Double click this block\\nto modify the p"
"arameters');"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"SubSystem"
	Location		[152, 182, 650, 482]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [280, 20, 310, 50]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|-+"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum2"
      Ports		      [3, 1]
      Position		      [280, 175, 310, 205]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "-+-"
    }
    Block {
      BlockType		      Constant
      Name		      "X"
      Position		      [205, 260, 240, 290]
      Value		      "Xline"
    }
    Block {
      BlockType		      Gain
      Name		      "wo\n"
      Position		      [345, 14, 390, 56]
      Gain		      "2*pi*f"
    }
    Block {
      BlockType		      Constant
      Name		      "ws"
      Position		      [215, 20, 250, 50]
    }
    Block {
      BlockType		      Outport
      Name		      "angle"
      Position		      [530, 28, 560, 42]
    }
    Block {
      BlockType		      Outport
      Name		      "speed"
      Position		      [535, 183, 565, 197]
      Port		      "2"
    }
    Block {
      BlockType		      Outport
      Name		      "power"
      Position		      [535, 278, 565, 292]
      Port		      "3"
    }
    Line {
      SrcBlock		      "ws"
      SrcPort		      1
      DstBlock		      "Sum1"
      DstPort		      1
    }
    Line {
      Name		      "delta"
      Labels		      [1, 0]
      SrcBlock		      "Integrator"
      SrcPort		      1
      Points		      [40, 0]
      Branch {
	Points			[0, 300; -230, 0; 0, -40]
	DstBlock		"Mux"
	DstPort			2
      }
      Branch {
	DstBlock		"angle"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      DstBlock		      "wo\n"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "EVsin(delta)/X"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum2"
      SrcPort		      1
      DstBlock		      "1/2H"
      DstPort		      1
    }
    Line {
      SrcBlock		      "1/2H"
      SrcPort		      1
      DstBlock		      "Integrator1"
      DstPort		      1
    }
    Line {
      Name		      "wm"
      Labels		      [1, 0]
      SrcBlock		      "Integrator1"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	Points			[0, -100; -185, 0]
	DstBlock		"Sum1"
	DstPort			2
      }
      Branch {
	DstBlock		"speed"
	DstPort			1
      }
    }
    Line {
      Name		      "Pm"
      Labels		      [1, 0]
      SrcBlock		      "Look-Up\nTable"
      SrcPort		      1
      DstBlock		      "Sum2"
      DstPort		      2
    }
    Line {
      SrcBlock		      "D"
      SrcPort		      1
      DstBlock		      "Sum2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "wo\n"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	DstBlock		"Integrator"
	DstPort			1
      }
      Branch {
	Points			[0, 75; -105, 0]
	DstBlock		"D"
	DstPort			1
      }
    }
    Line {
      Name		      "Pe"
      SrcBlock		      "EVsin(delta)/X"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	Labels			[1, 0]
	DstBlock		"power"
	DstPort			1
      }
      Branch {
	Points			[0, -50; -150, 0]
	DstBlock		"Sum2"
	DstPort			3
      }
    }
    Line {
      SrcBlock		      "X"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Clock"
      SrcPort		      1
      DstBlock		      "Look-Up\nTable"
      DstPort		      1
    }
    Annotation {
      Name		      "TRANSIENT\nSTABILITY"
      Position		      [103, 32]
      ForegroundColor	      "red"
      FontSize		      14
      FontWeight	      "bold"
    }
    Annotation {
      Name		      "Damping"
      Position		      [257, 121]
    }
  }
}

⌨️ 快捷键说明

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