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

📄 pwm.mdl

📁 应用matlab中的simulink仿真环境实现由三相正弦波产生PWM波形的仿真实验。
💻 MDL
📖 第 1 页 / 共 3 页
字号:
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Sin
      SineType		      "Time based"
      TimeSource	      "Use simulation time"
      Amplitude		      "1"
      Bias		      "0"
      Frequency		      "1"
      Phase		      "0"
      Samples		      "10"
      Offset		      "0"
      SampleTime	      "-1"
      VectorParams1D	      on
    }
    Block {
      BlockType		      Step
      Time		      "1"
      Before		      "0"
      After		      "1"
      SampleTime	      "-1"
      VectorParams1D	      on
      ZeroCross		      on
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      InputSameDT	      on
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Switch
      Criteria		      "u2 >= Threshold"
      Threshold		      "0"
      InputSameDT	      on
      OutDataTypeMode	      "Inherit via internal rule"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "pwm"
    Location		    [2, 82, 1014, 721]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Sum
      Name		      "Add"
      Ports		      [3, 1]
      Position		      [690, 89, 720, 121]
      Inputs		      "+--"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      OutScaling	      "2^-10"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Sum
      Name		      "Add1"
      Ports		      [3, 1]
      Position		      [695, 209, 725, 241]
      Inputs		      "+--"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      OutScaling	      "2^-10"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Sum
      Name		      "Add2"
      Ports		      [3, 1]
      Position		      [715, 324, 745, 356]
      Inputs		      "+--"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
      OutScaling	      "2^-10"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [310, 65, 340, 95]
      Value		      "0.5*570"
    }
    Block {
      BlockType		      Constant
      Name		      "Constant1"
      Position		      [310, 180, 340, 210]
      Value		      "-0.5*570"
    }
    Block {
      BlockType		      Gain
      Name		      "Gain"
      Position		      [560, 90, 590, 120]
      Gain		      "2/3"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain1"
      Position		      [560, 145, 590, 175]
      Gain		      "1/3"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain2"
      Position		      [555, 200, 585, 230]
      Gain		      "2/3"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain3"
      Position		      [555, 245, 585, 275]
      Gain		      "1/3"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain4"
      Position		      [560, 360, 590, 390]
      Gain		      "1/3"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Gain
      Name		      "Gain5"
      Position		      [560, 310, 590, 340]
      Gain		      "2/3"
      ParameterDataTypeMode   "Inherit via internal rule"
      OutDataTypeMode	      "Inherit via internal rule"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [3]
      Position		      [815, 166, 845, 284]
      Floating		      off
      Location		      [5, 55, 1033, 741]
      Open		      off
      NumInputPorts	      "3"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
      }
      TimeRange		      "10"
      YMin		      "-400~-5~-5"
      YMax		      "400~5~5"
      SaveName		      "ScopeData4"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave"
      Ports		      [0, 1]
      Position		      [70, 95, 100, 125]
      SineType		      "Time based"
      Amplitude		      "380"
      Frequency		      "100*pi"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave1"
      Ports		      [0, 1]
      Position		      [65, 200, 95, 230]
      SineType		      "Time based"
      Amplitude		      "380"
      Frequency		      "100*pi"
      Phase		      "-2*pi/3"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Sin
      Name		      "Sine Wave2"
      Ports		      [0, 1]
      Position		      [65, 310, 95, 340]
      SineType		      "Time based"
      Amplitude		      "380"
      Frequency		      "100*pi"
      Phase		      "2*pi/3"
      SampleTime	      "0"
      VectorParams1D	      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem"
      Ports		      [0, 1]
      Position		      [60, 374, 100, 436]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"Subsystem"
	Location		[-5, 101, 1007, 740]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [35, 105, 65, 135]
	  Value			  "2"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [240, 50, 270, 80]
	  Gain			  "1000"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain1"
	  Position		  [405, 60, 435, 90]
	  Gain			  "500"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Integrator
	  Name			  "Integrator"
	  Ports			  [1, 1]
	  Position		  [165, 50, 195, 80]
	  IgnoreLimit		  off
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "Pulse\nGenerator"
	  Ports			  [0, 1]
	  Position		  [25, 38, 70, 72]
	  PulseType		  "Time based"
	  Amplitude		  "4"
	  Period		  "0.002"
	  PulseWidth		  "50"
	}
	Block {
	  BlockType		  Scope
	  Name			  "Scope1"
	  Ports			  [1]
	  Position		  [185, 114, 215, 146]
	  Floating		  off
	  Location		  [5, 51, 1033, 737]
	  Open			  off
	  NumInputPorts		  "1"
	  ZoomMode		  "xonly"
	  List {
	    ListType		    AxesTitles
	    axes1		    "%<SignalLabel>"
	  }
	  TimeRange		  "100"
	  DataFormat		  "StructureWithTime"
	  MaxDataPoints		  "500000"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Scope
	  Name			  "Scope2"
	  Ports			  [1]
	  Position		  [510, 104, 540, 136]
	  Floating		  off
	  Location		  [5, 55, 1033, 741]
	  Open			  on
	  NumInputPorts		  "1"
	  ZoomMode		  "xonly"
	  List {
	    ListType		    AxesTitles
	    axes1		    "%<SignalLabel>"
	  }
	  TimeRange		  "100"
	  SaveName		  "ScopeData1"
	  DataFormat		  "StructureWithTime"
	  MaxDataPoints		  "500000"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Step
	  Name			  "Step"
	  Position		  [230, 180, 260, 210]
	  Time			  "0"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Subtract"
	  Ports			  [2, 1]
	  Position		  [100, 47, 130, 78]
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Subtract1"
	  Ports			  [2, 1]
	  Position		  [310, 57, 340, 88]
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [465, 68, 495, 82]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Pulse\nGenerator"
	  SrcPort		  1
	  DstBlock		  "Subtract"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  Points		  [5, 0; 0, -50]
	  DstBlock		  "Subtract"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Step"
	  SrcPort		  1
	  Points		  [15, 0; 0, -115]
	  DstBlock		  "Subtract1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Subtract1"
	  SrcPort		  1
	  DstBlock		  "Gain1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Subtract"
	  SrcPort		  1
	  Points		  [10, 0]
	  Branch {
	    DstBlock		    "Integrator"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 65]
	    DstBlock		    "Scope1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Integrator"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "Subtract1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain1"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    DstBlock		    "Out1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 45]
	    DstBlock		    "Scope2"
	    DstPort		    1
	  }
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem1"
      Ports		      [2, 1]
      Position		      [195, 95, 235, 155]
      TreatAsAtomicUnit	      off
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      MaskHideContents	      off
      System {
	Name			"Subsystem1"
	Location		[2, 83, 1014, 722]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [35, 28, 65, 42]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "In2"
	  Position		  [25, 153, 55, 167]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [270, 60, 300, 90]
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  OutDataTypeMode	  "Inherit via internal rule"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Scope
	  Name			  "Scope"
	  Ports			  [1]
	  Position		  [345, 109, 375, 141]
	  Floating		  off
	  Location		  [5, 55, 1033, 741]
	  Open			  off
	  NumInputPorts		  "1"
	  ZoomMode		  "xonly"
	  List {
	    ListType		    AxesTitles
	    axes1		    "%<SignalLabel>"
	  }
	  TimeRange		  "100"
	  DataFormat		  "StructureWithTime"
	  SampleTime		  "0"
	}
	Block {
	  BlockType		  Signum
	  Name			  "Sign"
	  Position		  [190, 55, 220, 85]
	}
	Block {
	  BlockType		  Sum
	  Name			  "Subtract"
	  Ports			  [2, 1]
	  Position		  [100, 67, 130, 98]
	  Inputs		  "+-"
	  InputSameDT		  off
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutScaling		  "2^-10"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [335, 63, 365, 77]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "Subtract"
	  SrcPort		  1
	  Points		  [10, 0; 0, -15]
	  DstBlock		  "Sign"
	  DstPort		  1
	}
	Line {

⌨️ 快捷键说明

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