📄 m2_1_2.mdl
字号:
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
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
System {
Name "Phasor Measurements"
Location [255, 525, 861, 796]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "measure"
Position [70, 28, 100, 42]
}
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]
InitialOutput "0"
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "measure"
SrcPort 1
Points [0, 0; 5, 0]
Branch {
Points [0, 30]
Branch {
Points [0, 40]
DstBlock "Complex to\nMagnitude-Angle"
DstPort 1
}
Branch {
DstBlock "Complex to\nReal-Imag"
DstPort 1
}
}
Branch {
DstBlock "Mux2"
DstPort 1
}
}
Line {
SrcBlock "Complex to\nReal-Imag"
SrcPort 1
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "Complex to\nReal-Imag"
SrcPort 2
DstBlock "Mux2"
DstPort 3
}
Line {
SrcBlock "Complex to\nMagnitude-Angle"
SrcPort 1
DstBlock "Mux2"
DstPort 4
}
Line {
SrcBlock "Complex to\nMagnitude-Angle"
SrcPort 2
DstBlock "180/pi"
DstPort 1
}
Line {
SrcBlock "180/pi"
SrcPort 1
DstBlock "Mux2"
DstPort 5
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "options"
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"
PortType "p1"
LConnTagsString "+"
RConnTagsString "-"
MaskType "InnerPowersysBlock"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType From
Name "source"
Position [25, 124, 95, 146]
GotoTag "tp020954"
}
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
InitialOutput "0"
}
Line {
LineType "Connection"
SrcBlock "-"
SrcPort RConn1
Points [0, 0]
DstBlock "VoltageMeasurement"
DstPort RConn1
}
Line {
LineType "Connection"
SrcBlock "+"
SrcPort RConn1
Points [0, 0]
DstBlock "VoltageMeasurement"
DstPort LConn1
}
Line {
SrcBlock "Simulation method"
SrcPort 1
DstBlock "Phasor Measurements"
DstPort enable
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "Phasor Measurements"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "v"
DstPort 1
}
Line {
SrcBlock "source"
SrcPort 1
Points [0, 0; 10, 0]
Branch {
DstBlock "Phasor Measurements"
DstPort 1
}
Branch {
Points [0, 30]
DstBlock "Mux"
DstPort 2
}
}
}
}
Block {
BlockType Reference
Name "Mosfet1"
Ports [1, 1, 0, 0, 0, 1, 1]
Position [245, 470, 300, 510]
AttributesFormatString "\\n"
SourceBlock "powerlib/Power\nElectronics/Mosfet"
SourceType "Mosfet"
Ron "0.001"
Lon "1e-6"
Rd ".001"
IC "0"
Rs "1e5"
Cs "inf"
Measurements on
}
Block {
BlockType SubSystem
Name "Pulse\nGenerator3"
Ports [0, 1]
Position [175, 27, 210, 53]
TreatAsAtomicUnit off
MaskType "Pulse Generator"
MaskDescription "Pulse Generator"
MaskHelp "Pulse generator which ensures pulse transitions"
" are hit. Provides a vector of pulses when the height is entered as a vector."
" Unmask to see how it works."
MaskPromptString "Period (secs):|Duty cycle (% of period):|Amplit"
"ude:|Start time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "period=@1;duty=@2;amplitude=@3;start=@4;"
MaskInitialization "\n"
MaskDisplay "plot(0,0,100,100,[95,90,90,75,75,60,60,45,45,30"
",30,15,15,5],[25,25,75,75,25,25,75,75,25,25,75,75,25,25]); \n "
" "
" \n "
" "
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|100|0.000000001|0"
System {
Name "Pulse\nGenerator3"
Location [200, 343, 539, 534]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Constant
Name "Constant1"
Position [40, 135, 60, 155]
Value "0"
}
Block {
BlockType Sin
Name "Sine Wave"
Position [35, 83, 65, 107]
SineType "Time based"
Frequency "2*pi./period"
Phase "-2*pi*(start./period + duty/200 - 1/4)"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [35, 27, 65, 53]
Time "start"
After "amplitude"
SampleTime "0"
}
Block {
BlockType Switch
Name "Switch"
Position [120, 65, 155, 125]
Threshold "sin(pi*(0.5 - duty/100))"
}
Block {
BlockType Outport
Name "out1"
Position [250, 88, 280, 102]
InitialOutput "0"
}
Line {
SrcBlock "Step"
SrcPort 1
Points [20, 0; 0, 35]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [25, 0; 0, -30]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "out1"
DstPort 1
}
Line {
SrcBlock "Sine Wave"
SrcPort 1
Points [5, 0; 20, 0]
DstBlock "Switch"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Pulse\nGenerator4"
Ports [0, 1]
Position [175, 227, 210, 253]
TreatAsAtomicUnit off
MaskType "Pulse Generator"
MaskDescription "Pulse Generator"
MaskHelp "Pulse generator which ensures pulse transitions"
" are hit. Provides a vector of pulses when the height is entered as a vector."
" Unmask to see how it works."
MaskPromptString "Period (secs):|Duty cycle (% of period):|Amplit"
"ude:|Start time:"
MaskStyleString "edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on"
MaskCallbackString "|||"
MaskEnableString "on,on,on,on"
MaskVisibilityString "on,on,on,on"
MaskToolTipString "on,on,on,on"
MaskVarAliasString ",,,"
MaskVariables "period=@1;duty=@2;amplitude=@3;start=@4;"
MaskInitialization "\n"
MaskDisplay "plot(0,0,100,100,[95,90,90,75,75,60,60,45,45,30"
",30,15,15,5],[25,25,75,75,25,25,75,75,25,25,75,75,25,25]); \n "
" "
" \n "
" "
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "1|100|0.000000001|0"
System {
Name "Pulse\nGenerator4"
Location [200, 343, 539, 534]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Constant
Name "Constant1"
Position [40, 135, 60, 155]
Value "0"
}
Block {
BlockType Sin
Name "Sine Wave"
Position [35, 83, 65, 107]
SineType "Time based"
Frequency "2*pi./period"
Phase "-2*pi*(start./period + duty/200 - 1/4)"
SampleTime "0"
}
Block {
BlockType Step
Name "Step"
Position [35, 27, 65, 53]
Time "start"
After "amplitude"
SampleTime "0"
}
Block {
BlockType Switch
Name "Switch"
Position [120, 65, 155, 125]
Threshold "sin(pi*(0.5 - duty/100))"
}
Block {
BlockType Outport
Name "out1"
Position [250, 88, 280, 102]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -