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

📄 svpwm3.mdl

📁 关于电机的.m程序
💻 MDL
📖 第 1 页 / 共 3 页
字号:
    }
    Block {
      BlockType		      TransportDelay
      Name		      "T1"
      Position		      [1060, 685, 1100, 715]
      DelayTime		      "1/fsw"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace1"
      Position		      [1280, 533, 1320, 567]
      ShowName		      off
      VariableName	      "abpwm"
      MaxDataPoints	      "inf"
      Decimation	      "2"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace2"
      Position		      [1220, 738, 1250, 772]
      ShowName		      off
      VariableName	      "ab"
      MaxDataPoints	      "inf"
      Decimation	      "2"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Gain
      Name		      "Vdc"
      Position		      [1090, 525, 1145, 575]
      BackgroundColor	      "red"
      ShowName		      off
    }
    Block {
      BlockType		      Scope
      Name		      "control signals"
      Ports		      [1]
      Position		      [865, 451, 900, 499]
      Location		      [674, 87, 1118, 406]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"Control signals"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "0.02"
      YMin		      "-1"
      YMax		      "1"
      SaveToWorkspace	      on
      SaveName		      "cs"
      DataFormat	      "Array"
      MaxDataPoints	      "25000"
      SampleInput	      on
    }
    Block {
      BlockType		      Integrator
      Name		      "int2"
      Ports		      [1, 1]
      Position		      [1015, 656, 1035, 694]
      ShowName		      off
    }
    Block {
      BlockType		      Gain
      Name		      "modulation\nindex1"
      Position		      [410, 102, 460, 148]
      BackgroundColor	      "red"
      NamePlacement	      "alternate"
      ShowName		      off
    }
    Block {
      BlockType		      Gain
      Name		      "modulation\nindex2"
      Position		      [525, 632, 575, 678]
      BackgroundColor	      "red"
      NamePlacement	      "alternate"
      ShowName		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "plots2"
      Ports		      []
      Position		      [90, 758, 367, 830]
      ForegroundColor	      "red"
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "svpwm3b\n       \n       \n       "
      FontName		      "Arial"
      FontSize		      24
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('To a simpler model')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"plots2"
	Location		[83, 506, 530, 694]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
      }
    }
    Block {
      BlockType		      Display
      Name		      "pole duty ratios"
      Ports		      [1]
      Position		      [605, 326, 685, 394]
      Decimation	      "1"
    }
    Block {
      BlockType		      MultiPortSwitch
      Name		      "sector\nselector"
      Ports		      [7, 1]
      Position		      [415, 293, 445, 537]
      Inputs		      "6"
    }
    Block {
      BlockType		      Display
      Name		      "sector #"
      Ports		      [1]
      Position		      [420, 203, 505, 237]
      Decimation	      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "sector selector1"
      Ports		      [1, 1]
      Position		      [245, 189, 335, 251]
      TreatAsAtomicUnit	      off
      System {
	Name			"sector selector1"
	Location		[506, 601, 1138, 775]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "fs"
	  Position		  [15, 43, 45, 57]
	}
	Block {
	  BlockType		  Gain
	  Name			  "1/(pi/3)"
	  Position		  [350, 35, 380, 65]
	  Gain			  "1/(pi/3)"
	}
	Block {
	  BlockType		  Gain
	  Name			  "2*pi"
	  Position		  [255, 75, 285, 105]
	  Gain			  "2*pi"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [155, 80, 185, 110]
	  ShowName		  off
	  Value			  "0"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant3"
	  Position		  [410, 75, 440, 105]
	  ShowName		  off
	  Value			  "6"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant4"
	  Position		  [480, 115, 510, 145]
	  ShowName		  off
	}
	Block {
	  BlockType		  Math
	  Name			  "Math\nFunction2"
	  Ports			  [2, 1]
	  Position		  [480, 29, 515, 111]
	  ShowName		  off
	  Operator		  "mod"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator"
	  Position		  [205, 72, 235, 103]
	  ShowName		  off
	  Operator		  "<"
	}
	Block {
	  BlockType		  Rounding
	  Name			  "Rounding\nFunction"
	  Position		  [410, 35, 440, 65]
	  ShowName		  off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [535, 60, 555, 80]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum6"
	  Ports			  [2, 1]
	  Position		  [290, 40, 310, 60]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|++"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "x->theta"
	  Position		  [75, 38, 155, 62]
	  ShowName		  off
	  Expr			  "atan2(u(2),u(1))"
	}
	Block {
	  BlockType		  Outport
	  Name			  "sector"
	  Position		  [575, 63, 605, 77]
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  DstBlock		  "Relational\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Relational\nOperator"
	  SrcPort		  1
	  DstBlock		  "2*pi"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "2*pi"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Sum6"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "1/(pi/3)"
	  SrcPort		  1
	  DstBlock		  "Rounding\nFunction"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rounding\nFunction"
	  SrcPort		  1
	  DstBlock		  "Math\nFunction2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant3"
	  SrcPort		  1
	  DstBlock		  "Math\nFunction2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "fs"
	  SrcPort		  1
	  DstBlock		  "x->theta"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "x->theta"
	  SrcPort		  1
	  Points		  [0, 0; 30, 0]
	  Branch {
	    DstBlock		    "Relational\nOperator"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Sum6"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  DstBlock		  "sector"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Math\nFunction2"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant4"
	  SrcPort		  1
	  Points		  [30, 0]
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum6"
	  SrcPort		  1
	  DstBlock		  "1/(pi/3)"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "sector1"
      Position		      [235, 330, 365, 360]
      ShowName		      off
      Value		      "[1 1 0.5 ;0 1 0.5;0 0 0.5]"
    }
    Block {
      BlockType		      Constant
      Name		      "sector2"
      Position		      [235, 365, 365, 395]
      ShowName		      off
      Value		      "[1 0 0.5 ;1 1 0.5; 0 0 0.5] "
      VectorParams1D	      off
    }
    Block {
      BlockType		      Constant
      Name		      "sector3"
      Position		      [235, 400, 365, 430]
      ShowName		      off
      Value		      "[0 0 0.5 ;1 1 0.5; 0 1 0.5] "
      VectorParams1D	      off
    }
    Block {
      BlockType		      Constant
      Name		      "sector4"
      Position		      [235, 435, 365, 465]
      ShowName		      off
      Value		      "[0 0 0.5 ;1 0 0.5; 1 1 0.5] "
    }
    Block {
      BlockType		      Constant
      Name		      "sector5"
      Position		      [235, 470, 365, 500]
      ShowName		      off
      Value		      "[0 1 0.5 ; 0 0 0.5; 1 1 0.5] "
      VectorParams1D	      off
    }
    Block {
      BlockType		      Constant
      Name		      "sector6"
      Position		      [235, 505, 365, 535]
      ShowName		      off
      Value		      "[1 1 0.5; 0 0 0.5; 1 0 0.5] "
      VectorParams1D	      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "space vector1"
      Ports		      []
      Position		      [747, 694, 895, 833]
      ForegroundColor	      "orange"
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "close all,figure(1),plot(cs(:,1),cs(:,2),cs(:,1"
"),cs(:,3),cs(:,1),cs(:,4)),grid,title('Control signals'),figure(2),plot(abpwm"
"(:,1),abpwm(:,2),'-b',ab(:,1),ab(:,2),'-r'),axis equal,grid,title('OUTPUT SPA"
"CE VECTOR TRAJECTORY')"
      FontName		      "Arial"
      FontSize		      18
      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 vector1"
	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		      Display
      Name		      "state duty ratios"
      Ports		      [1]
      Position		      [810, 274, 890, 346]
      Decimation	      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "xyz"
      Ports		      [2, 1]
      Position		      [515, 108, 710, 172]
      ShowName		      off
      FontName		      "Arial"
      FontSize		      16
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('xyz calculator')"
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"xyz"
	Location		[74, 104, 579, 311]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"78"
	Block {
	  BlockType		  Inport
	  Name			  "amp"
	  Position		  [15, 72, 45, 88]
	}
	Block {
	  BlockType		  Inport
	  Name			  "phase"
	  Position		  [15, 110, 45, 124]
	  Port			  "2"
	}
	Block {
	  BlockType		  Constant
	  Name			  "1"
	  Position		  [322, 85, 338, 100]
	  Orientation		  "up"
	  ShowName		  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "2"
	  Position		  [362, 85, 378, 100]
	  Orientation		  "up"
	  ShowName		  off
	  Value			  "0"
	}
	Block {
	  BlockType		  Math
	  Name			  "Math\nFunction"
	  Ports			  [2, 1]
	  Position		  [85, 106, 115, 139]
	  ShowName		  off
	  Operator		  "mod"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux1"
	  Ports			  [3, 1]
	  Position		  [405, 151, 410, 189]
	  ShowName		  off
	  Inputs		  "3"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux2"
	  Ports			  [3, 1]
	  Position		  [400, 35, 405, 85]
	  ShowName		  off
	  Inputs		  "3"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Product
	  Name			  "Product"
	  Ports			  [2, 1]
	  Position		  [265, 207, 295, 238]
	  ShowName		  off
	}
	Block {
	  BlockType		  Product
	  Name			  "Product1"
	  Ports			  [2, 1]
	  Position		  [265, 102, 295, 133]
	  ShowName		  off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [320, 50, 340, 70]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|-+"
	  Port {
	    PortNumber		    1
	    Name		    "y1"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [145, 220, 165, 240]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "-+|"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum3"
	  Ports			  [3, 1]
	  Position		  [340, 144, 360, 216]
	  ShowName		  off
	  Inputs		  "-+-|"
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch"
	  Position		  [530, 195, 560, 225]
	  ShowName		  off
	  Threshold		  "0.5"
	}
	Block {
	  BlockType		  Trigonometry
	  Name			  "Trigonometric\nFunction"
	  Ports			  [1, 1]
	  Position		  [190, 110, 220, 140]
	  ShowName		  off
	}
	Block {
	  BlockType		  Trigonometry
	  Name			  "Trigonometric\nFunction2"
	  Ports			  [1, 1]
	  Position		  [190, 215, 220, 245]
	  ShowName		  off
	}
	Block {
	  BlockType		  Fcn
	  Name			  "d1"
	  Position		  [450, 198, 485, 222]
	  ShowName		  off
	  Expr			  "u<0"
	}
	Block {
	  BlockType		  Constant
	  Name			  "one"
	  Position		  [270, 155, 300, 185]
	  ShowName		  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "pi/1"
	  Position		  [85, 215, 115, 245]
	  ShowName		  off
	  Value			  "pi/3"
	}
	Block {
	  BlockType		  Constant
	  Name			  "pi/3"
	  Position		  [35, 140, 65, 170]
	  ShowName		  off
	  Value			  "pi/3"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "x1"
	  Position		  [200, 28, 260, 62]
	  Expr			  "(sqrt(3)*cos(u)-sin(u))/(sqrt(3)*cos(u)+sin"
"(u))"

⌨️ 快捷键说明

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