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

📄 pwm3.mdl

📁 关于电机的.m程序
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      Frequency		      "2*pi*50"
      Phase		      "pi/2"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave1"
      Position		      [40, 165, 70, 195]
      SineType		      "Time based"
      Frequency		      "2*pi*50"
      Phase		      "pi/2 -2*pi/3"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave2"
      Position		      [40, 225, 70, 255]
      SineType		      "Time based"
      Frequency		      "2*pi*50"
      Phase		      "pi/2+2*pi/3"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum5"
      Ports		      [2, 1]
      Position		      [795, 398, 805, 447]
      ShowName		      off
      Inputs		      "+-"
    }
    Block {
      BlockType		      TransportDelay
      Name		      "T1"
      Position		      [735, 420, 775, 450]
      DelayTime		      "1/fsw"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace1"
      Position		      [665, 283, 705, 317]
      ShowName		      off
      VariableName	      "abpwm"
      MaxDataPoints	      "inf"
      Decimation	      "2"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace2"
      Position		      [895, 473, 925, 507]
      ShowName		      off
      VariableName	      "ab"
      MaxDataPoints	      "inf"
      Decimation	      "2"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "To Workspace3"
      Position		      [115, 460, 145, 490]
      ShowName		      off
      VariableName	      "h"
      MaxDataPoints	      "1"
      SampleTime	      "-1"
      SaveFormat	      "Array"
    }
    Block {
      BlockType		      Scope
      Name		      "ab\ncomponents"
      Ports		      [1]
      Position		      [655, 188, 685, 222]
      ForegroundColor	      "blue"
      NamePlacement	      "alternate"
      Location		      [26, 89, 526, 380]
      Open		      on
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "0.02"
      YMin		      "-0.8"
      YMax		      "0.8"
      SaveName		      "ScopeData1"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "ab2dq"
      Ports		      [1, 1]
      Position		      [770, 324, 830, 376]
      ForegroundColor	      "red"
      TreatAsAtomicUnit	      off
      Port {
	PortNumber		1
	Name			"dq"
	PropagatedSignals	", "
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
      System {
	Name			"ab2dq"
	Location		[658, 416, 996, 663]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "ab"
	  Position		  [20, 92, 50, 108]
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn"
	  Position		  [165, 22, 220, 58]
	  Expr			  "u(1)*cos(u(3))+u(2)*sin(u(3))"
	}
	Block {
	  BlockType		  Fcn
	  Name			  "Fcn1"
	  Position		  [165, 186, 220, 224]
	  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		  [270, 106, 275, 139]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Clock
	  Name			  "t"
	  Position		  [80, 110, 100, 130]
	  Decimation		  "10"
	}
	Block {
	  BlockType		  Gain
	  Name			  "w"
	  Position		  [115, 102, 165, 138]
	  Gain			  "2*pi*50"
	}
	Block {
	  BlockType		  Outport
	  Name			  "dq"
	  Position		  [300, 118, 330, 132]
	}
	Line {
	  SrcBlock		  "t"
	  SrcPort		  1
	  DstBlock		  "w"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux3"
	  SrcPort		  1
	  DstBlock		  "Fcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux4"
	  SrcPort		  1
	  DstBlock		  "Fcn1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "w"
	  SrcPort		  1
	  Points		  [10, 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		  "ab"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, -75]
	    DstBlock		    "Mux3"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 90]
	    DstBlock		    "Mux4"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Fcn1"
	  SrcPort		  1
	  Points		  [30, 0]
	  DstBlock		  "Mux5"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Fcn"
	  SrcPort		  1
	  Points		  [30, 0]
	  DstBlock		  "Mux5"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux5"
	  SrcPort		  1
	  DstBlock		  "dq"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "control signals"
      Ports		      [1]
      Position		      [265, 116, 300, 164]
      NamePlacement	      "alternate"
      Location		      [146, 70, 656, 359]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"Control signals"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "0.02"
      YMin		      "-1"
      YMax		      "1"
      SaveToWorkspace	      on
      SaveName		      "cs1"
      DataFormat	      "Array"
      MaxDataPoints	      "25000"
      SampleInput	      on
    }
    Block {
      BlockType		      Scope
      Name		      "dq \ncomponents"
      Ports		      [1]
      Position		      [970, 234, 1000, 266]
      ForegroundColor	      "magenta"
      Location		      [664, 136, 1128, 430]
      Open		      on
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "0.02"
      YMin		      "-0.6"
      YMax		      "0.8"
      SaveName		      "ScopeData2"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "dq \ncomponents1"
      Ports		      [1]
      Position		      [860, 334, 890, 366]
      ForegroundColor	      "magenta"
      Location		      [665, 497, 1136, 791]
      Open		      on
      NumInputPorts	      "1"
      ZoomMode		      "yonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "0.02"
      YMin		      "-0.6"
      YMax		      "0.8"
      SaveName		      "ScopeData3"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "fourier"
      Ports		      []
      Position		      [66, 396, 139, 439]
      BackgroundColor	      "yellow"
      DropShadow	      on
      NamePlacement	      "alternate"
      ShowName		      off
      OpenFcn		      "fourierdec"
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskHelp		      "Fourier series decomposition"
      MaskDisplay	      "disp('FOURIER')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"fourier"
	Location		[148, 571, 512, 671]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Annotation {
	  Name			  "To obtain the Fourier decomposition of a pe"
"riodic signal:\na) run a simulation for one period duration\nb) Specify the f"
"undamental frequency\n    c) Specify the number of harmonics\n"
	  Position		  [187, 48]
	  FontSize		  12
	}
      }
    }
    Block {
      BlockType		      Integrator
      Name		      "int2"
      Ports		      [1, 1]
      Position		      [650, 391, 670, 429]
      ShowName		      off
    }
    Block {
      BlockType		      Gain
      Name		      "modulation\nindex2"
      Position		      [160, 157, 210, 203]
      BackgroundColor	      "red"
      NamePlacement	      "alternate"
      ShowName		      off
    }
    Block {
      BlockType		      Constant
      Name		      "number of\nharmonics"
      Position		      [60, 460, 90, 490]
      BackgroundColor	      "orange"
      Value		      "50"
    }
    Block {
      BlockType		      SubSystem
      Name		      "pwm1"
      Ports		      [1, 1]
      Position		      [335, 265, 460, 385]
      FontName		      "Arial"
      FontSize		      14
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('mod 2')"
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"pwm1"
	Location		[678, 394, 1102, 585]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "ABC"
	  Position		  [25, 48, 55, 62]
	}
	Block {
	  BlockType		  Gain
	  Name			  "3to2"
	  Position		  [315, 33, 355, 77]
	  Gain			  "2/3*[1 -0.5 -0.5;0 sqrt(3)/2 -sqrt(3)/2]"
	  Multiplication	  "Matrix(K*u)"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Repeating\nSequence"
	  Ports			  [0, 1]
	  Position		  [45, 112, 90, 158]
	  ShowName		  off
	  SourceBlock		  "simulink/Sources/Repeating\nSequence"
	  SourceType		  "Repeating table"
	  rep_seq_t		  "[0  0.5/fsw 1/fsw]"
	  rep_seq_y		  "[1 -1 1]"
	  Port {
	    PortNumber		    1
	    Name		    "tri"
	    TestPoint		    off
	    LinearAnalysisOutput    off
	    LinearAnalysisInput	    off
	    RTWStorageClass	    "Auto"
	    DataLogging		    off
	    DataLoggingNameMode	    "SignalName"
	    DataLoggingDecimateData off
	    DataLoggingDecimation   "2"
	    DataLoggingLimitDataPoints off
	    DataLoggingMaxPoints    "5000"
	  }
	}
	Block {
	  BlockType		  Signum
	  Name			  "Sign"
	  Position		  [200, 40, 230, 70]
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"
	  Ports			  [2, 1]
	  Position		  [140, 45, 160, 65]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Vdc/2"
	  Position		  [255, 40, 285, 70]
	  Gain			  "Vdc/2"
	}
	Block {
	  BlockType		  Gain
	  Name			  "ma"
	  Position		  [85, 40, 115, 70]
	}
	Block {
	  BlockType		  Outport
	  Name			  "ab"
	  Position		  [380, 48, 410, 62]
	}
	Line {
	  SrcBlock		  "ma"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "Sign"
	  DstPort		  1
	}
	Line {
	  Name			  "tri"
	  Labels		  [0, 0]
	  SrcBlock		  "Repeating\nSequence"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Vdc/2"
	  SrcPort		  1
	  DstBlock		  "3to2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "3to2"
	  SrcPort		  1
	  DstBlock		  "ab"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "ABC"
	  SrcPort		  1
	  DstBlock		  "ma"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sign"
	  SrcPort		  1
	  DstBlock		  "Vdc/2"
	  DstPort		  1
	}
	Annotation {
	  Name			  "Sinusoidal PWM"
	  Position		  [283, 141]
	  FontSize		  11
	  FontWeight		  "bold"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "pwm2"
      Ports		      [1, 1]
      Position		      [330, 118, 455, 242]
      FontName		      "Arial"
      FontSize		      16
      FontWeight	      "bold"
      TreatAsAtomicUnit	      off
      MaskDisplay	      "disp('mod 1')"
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"pwm2"
	Location		[656, 647, 1126, 788]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"96"
	Block {
	  BlockType		  Inport
	  Name			  "ABC"
	  Position		  [15, 33, 45, 47]
	}

⌨️ 快捷键说明

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