📄 swps_2.mdl
字号:
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"
LeftPortType "p1"
RightPortType "p1"
LConnTagsString "+"
RConnTagsString "-"
MaskType "InnerPowersysBlock"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType SubSystem
Name "source"
Ports [0, 1]
Position [25, 124, 95, 146]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskInitialization "Parent = get_param(gcb,'Parent'); "
" "
" \npss = get_param(Parent,'UserData'); "
" \nif isemp"
"ty(pss) "
" \n A=0;B=0;C=0;D=0;x0=0;Rswi"
"tch=0;TypeSwitch=0;Ts=1;YSwitchCurrent=-1; "
" \nelse "
" "
" \n A=pss.A;B=pss.B;C=pss.C;D=pss.D;x0=pss.x0;Rswitch=pss.Rswitch;TypeS"
"witch=pss.TypeSwitch;Ts=0;YSwitchCurrent=pss.YSwitchCurrent;\nend "
" "
" "
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "source"
Location [443, 461, 1085, 867]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Mux
Name "MasterMux"
Ports [2, 1]
Position [315, 106, 340, 144]
NamePlacement "alternate"
Inputs "[-1 2]"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [140, 67, 170, 163]
Inputs "[2 2]"
}
Block {
BlockType Mux
Name "MuxSwitch"
Ports [1, 1]
Position [235, 126, 265, 214]
Inputs "1"
}
Block {
BlockType "S-Function"
Name "State-Space"
Ports [1, 1]
Position [375, 103, 455, 147]
FunctionName "sfun_psbcontc"
Parameters "A,B,C,D,x0,Rswitch,YSwitchCurrent"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Block {
BlockType SubSystem
Name "electrical sources"
Ports [0, 1]
Position [50, 102, 75, 128]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "electrical sources"
Location [49, 463, 473, 721]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [170, 98, 175, 187]
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType From
Name "from1"
Position [20, 30, 75, 60]
DialogController "Simulink.DDGSource"
GotoTag "tp323147"
}
Block {
BlockType From
Name "from2"
Position [20, 65, 75, 95]
DialogController "Simulink.DDGSource"
GotoTag "tp323146"
}
Block {
BlockType Outport
Name "Out"
Position [200, 128, 225, 152]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [0, -5]
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "from1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "from2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "ideal_switch"
Ports [1, 2]
Position [340, 231, 435, 264]
Orientation "left"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "ideal_switch"
Location [353, 476, 871, 654]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [90, 20, 115, 40]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [145, 15, 185, 45]
Elements "[1 2]"
InputPortWidth "3"
}
Block {
BlockType SubSystem
Name "froms"
Ports [0, 1]
Position [145, 64, 185, 96]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "froms"
Location [5, 415, 371, 622]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType From
Name "From1"
Position [20, 30, 75, 60]
DialogController "Simulink.DDGSource"
GotoTag "tp323148"
}
Block {
BlockType From
Name "From2"
Position [20, 65, 75, 95]
DialogController "Simulink.DDGSource"
GotoTag "tp323150"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [235, 97, 270, 133]
Inputs "2"
}
Block {
BlockType Outport
Name "Out"
Position [315, 105, 335, 125]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "From1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "From2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "gotos"
Ports [1]
Position [395, 98, 440, 132]
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
System {
Name "gotos"
Location [193, 281, 559, 488]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [15, 90, 35, 110]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 2]
Position [100, 82, 135, 118]
Outputs "[2 2]"
}
Block {
BlockType Goto
Name "Goto1"
Position [220, 30, 275, 60]
DialogController "Simulink.DDGSource"
GotoTag "tp323149"
TagVisibility "global"
}
Block {
BlockType Goto
Name "Goto2"
Position [220, 65, 275, 95]
DialogController "Simulink.DDGSource"
GotoTag "tp323151"
TagVisibility "global"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [55, 72, 75, 128]
Elements "[1 3 2 4]"
InputPortWidth "4"
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Goto1"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Goto2"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "model"
Ports [2, 3]
Position [250, 22, 315, 68]
BackgroundColor "lightBlue"
DropShadow on
SourceBlock "powerlib_models/Continuous/ideal_sw"
"itch"
SourceType "Switch logic model"
ShowPortLabels on
Nsw "2"
Rsw "[0.1 0.1]"
}
Block {
BlockType Outport
Name "Out1"
Position [395, 18, 420, 42]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Block {
BlockType Outport
Name "Out2"
Position [395, 58, 420, 82]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Selector"
DstPort 1
}
Line {
SrcBlock "Selector"
SrcPort 1
DstBlock "model"
DstPort 1
}
Line {
SrcBlock "model"
SrcPort 1
DstBlock "Out1"
DstPort 1
}
Line {
SrcBlock "model"
SrcPort 2
DstBlock "Out2"
DstPort 1
}
Line {
SrcBlock "model"
SrcPort 3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -