op_amp.mdl

来自「PLLmatlab for simulink」· MDL 代码 · 共 1,181 行 · 第 1/3 页

MDL
1,181
字号
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [2, 1]
	  Position		  [275, 121, 280, 179]
	  ShowName		  off
	  Inputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Phasor Measurements"
	  Ports			  [1, 1, 1]
	  Position		  [145, 123, 250, 147]
	  BackgroundColor	  "green"
	  TreatAsAtomicUnit	  on
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  System {
	    Name		    "Phasor Measurements"
	    Location		    [255, 525, 861, 796]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "measure"
	      Position		      [70, 28, 100, 42]
	      Port		      "1"
	      IconDisplay	      "Port number"
	      LatchInput	      off
	    }
	    Block {
	      BlockType		      EnablePort
	      Name		      "Enable"
	      Ports		      []
	      Position		      [20, 15, 40, 35]
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "180/pi"
	      Position		      [225, 105, 245, 125]
	      Gain		      "180/pi"
	    }
	    Block {
	      BlockType		      ComplexToMagnitudeAngle
	      Name		      "Complex to\nMagnitude-Angle"
	      Ports		      [1, 2]
	      Position		      [140, 85, 195, 125]
	      ShowName		      off
	      Output		      "Magnitude and angle"
	    }
	    Block {
	      BlockType		      ComplexToRealImag
	      Name		      "Complex to\nReal-Imag"
	      Ports		      [1, 2]
	      Position		      [140, 45, 195, 85]
	      ShowName		      off
	      Output		      "Real and imag"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux2"
	      Ports		      [5, 1]
	      Position		      [275, 23, 280, 127]
	      ShowName		      off
	      Inputs		      "5"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      Selector
	      Name		      "Selector"
	      Ports		      [1, 1]
	      Position		      [315, 51, 350, 99]
	      Elements		      "OutputSelection"
	      InputPortWidth	      "5"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "options"
	      Position		      [380, 68, 410, 82]
	      IconDisplay	      "Port number"
	      BusOutputAsStruct	      off
	      InitialOutput	      "0"
	    }
	    Line {
	      SrcBlock		      "Selector"
	      SrcPort		      1
	      DstBlock		      "options"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "180/pi"
	      SrcPort		      1
	      DstBlock		      "Mux2"
	      DstPort		      5
	    }
	    Line {
	      SrcBlock		      "Complex to\nMagnitude-Angle"
	      SrcPort		      2
	      DstBlock		      "180/pi"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Complex to\nMagnitude-Angle"
	      SrcPort		      1
	      DstBlock		      "Mux2"
	      DstPort		      4
	    }
	    Line {
	      SrcBlock		      "Complex to\nReal-Imag"
	      SrcPort		      2
	      DstBlock		      "Mux2"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Complex to\nReal-Imag"
	      SrcPort		      1
	      DstBlock		      "Mux2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "measure"
	      SrcPort		      1
	      Points		      [0, 0; 5, 0]
	      Branch {
		DstBlock		"Mux2"
		DstPort			1
	      }
	      Branch {
		Points			[0, 30]
		Branch {
		  DstBlock		  "Complex to\nReal-Imag"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 40]
		  DstBlock		  "Complex to\nMagnitude-Angle"
		  DstPort		  1
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Mux2"
	      SrcPort		      1
	      DstBlock		      "Selector"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Selector
	  Name			  "Selector"
	  Ports			  [1, 1]
	  Position		  [305, 128, 370, 172]
	  Elements		  "SelectionMode"
	  InputPortWidth	  "length(OutputSelection)+1"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Simulation method"
	  Position		  [140, 85, 250, 105]
	  Orientation		  "down"
	  BackgroundColor	  "magenta"
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Value			  "PhasorSimulation"
	}
	Block {
	  BlockType		  PMComponent
	  Name			  "VoltageMeasurement"
	  Ports			  [0, 0, 0, 0, 0, 1, 1]
	  Position		  [80, 21, 145, 49]
	  PhysicalDomain	  "powersysdomain"
	  LeftPortType		  "p1"
	  RightPortType		  "p1"
	  LConnTagsString	  "+"
	  RConnTagsString	  "-"
	  MaskType		  "InnerPowersysBlock"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  From
	  Name			  "source"
	  Position		  [25, 124, 95, 146]
	  DialogController	  "Simulink.DDGSource"
	  GotoTag		  "tp215293"
	}
	Block {
	  BlockType		  PMIOPort
	  Name			  "+"
	  Position		  [15, 28, 45, 42]
	  Port			  "1"
	  Side			  "Left"
	}
	Block {
	  BlockType		  PMIOPort
	  Name			  "-"
	  Position		  [190, 24, 215, 46]
	  Orientation		  "left"
	  Port			  "2"
	  Side			  "Left"
	}
	Block {
	  BlockType		  Outport
	  Name			  "v"
	  Position		  [405, 139, 425, 161]
	  FontSize		  16
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	  InitialOutput		  "0"
	}
	Line {
	  SrcBlock		  "source"
	  SrcPort		  1
	  Points		  [0, 0; 10, 0]
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Mux"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Phasor Measurements"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Selector"
	  SrcPort		  1
	  DstBlock		  "v"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Phasor Measurements"
	  SrcPort		  1
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "Selector"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Simulation method"
	  SrcPort		  1
	  DstBlock		  "Phasor Measurements"
	  DstPort		  enable
	}
	Line {
	  LineType		  "Connection"
	  SrcBlock		  "+"
	  SrcPort		  RConn1
	  Points		  [0, 0]
	  DstBlock		  "VoltageMeasurement"
	  DstPort		  LConn1
	}
	Line {
	  LineType		  "Connection"
	  SrcBlock		  "-"
	  SrcPort		  RConn1
	  Points		  [0, 0]
	  DstBlock		  "VoltageMeasurement"
	  DstPort		  RConn1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "opamp1"
      Ports		      [0, 0, 0, 0, 0, 2, 2]
      Position		      [300, 27, 355, 83]
      SourceBlock	      "simpower_extensions_1/opamp"
      SourceType	      ""
      ShowPortLabels	      on
      f2		      "1e5"
      f1		      "1e4"
      Av		      "1000"
      v_min		      "-3"
      v_max		      "3"
      slew_rate		      "2e9"
    }
    Line {
      LineType		      "Connection"
      Points		      [255, 70; 30, 0]
      DstBlock		      "opamp1"
      DstPort		      LConn2
      Branch {
	ConnectType		"SRC_DEST"
	SrcBlock		"R1"
	SrcPort			RConn1
	Points			[-25, 0; 60, 0]
      }
      Branch {
	ConnectType		"SRC_SRC"
	Points			[0, 55]
	DstBlock		"R2 C1"
	DstPort			LConn1
      }
    }
    Line {
      LineType		      "Connection"
      Points		      [220, 110; 0, -70; 65, 0]
      DstBlock		      "opamp1"
      DstPort		      LConn1
      Branch {
	ConnectType		"SRC_DEST"
	SrcBlock		"Ground"
	SrcPort			LConn1
	Points			[0, 0; 0, -5]
      }
      Branch {
	ConnectType		"SRC_SRC"
	Points			[-140, 0]
	DstBlock		"CVS"
	DstPort			LConn1
      }
    }
    Line {
      LineType		      "Connection"
      Points		      [385, 70; -15, 0]
      DstBlock		      "opamp1"
      DstPort		      RConn2
      Branch {
	ConnectType		"SRC_DEST"
	SrcBlock		"R2 C1"
	SrcPort			RConn1
	Points			[15, 0; 0, -55]
      }
      Branch {
	ConnectType		"SRC_SRC"
	DstBlock		"Voltage Measurement"
	DstPort			LConn1
      }
    }
    Line {
      LineType		      "Connection"
      Points		      [430, 95; 0, -55; -60, 0]
      DstBlock		      "opamp1"
      DstPort		      RConn1
      Branch {
	ConnectType		"SRC_DEST"
	SrcBlock		"Ground1"
	SrcPort			LConn1
	Points			[0, 0; 0, -15]
      }
      Branch {
	ConnectType		"SRC_SRC"
	DstBlock		"Voltage Measurement"
	DstPort			LConn2
      }
    }
    Line {
      LineType		      "Connection"
      SrcBlock		      "CVS"
      SrcPort		      RConn1
      DstBlock		      "R1"
      DstPort		      LConn1
    }
    Line {
      SrcBlock		      "Vin"
      SrcPort		      1
      DstBlock		      "CVS"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Voltage Measurement"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Annotation {
      Name		      "Op Amp in G= -1 configuration\nNote that non in"
"verting OA output terminal is on the bottom!"
      Position		      [328, 185]
    }
  }
}

⌨️ 快捷键说明

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