📄 dc2ac2_v_0410_ddy.mdl
字号:
Value "400"
}
Block {
BlockType Reference
Name "Current Measurement"
Ports [0, 1, 0, 0, 0, 1, 1]
Position [690, 188, 715, 212]
SourceBlock "powerlib/Measurements/Current Measurement"
SourceType "Current Measurement"
ShowPortLabels on
PhasorSimulation off
OutputType "Complex"
PSBequivalent "0"
}
Block {
BlockType Reference
Name "DC Voltage Source"
Ports [0, 0, 0, 0, 0, 1, 1]
Position [145, 230, 165, 265]
Orientation "up"
SourceBlock "powerlib/Electrical\nSources/DC Voltage Source"
SourceType "DC Voltage Source"
ShowPortLabels on
Amplitude "400"
Measurements "None"
}
Block {
BlockType Reference
Name "Discrete\nPI Controller"
Ports [1, 1]
Position [910, 372, 955, 418]
Orientation "left"
NamePlacement "alternate"
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discr"
"ete\nPI Controller"
SourceType "Discrete PI Controller"
ShowPortLabels on
Kp "0.8"
Ki "60"
Par_Limits "[100 0]"
Init "0"
Ts "Ts"
}
Block {
BlockType SubSystem
Name "Discrete\nPWM Generator"
Ports [1, 1]
Position [365, 407, 440, 453]
Orientation "left"
AncestorBlock "powerlib_extras/Discrete \nControl Blocks/Discr"
"ete\nPWM Generator"
TreatAsAtomicUnit off
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
MaskType "Discrete PWM Generator"
MaskDescription "This discrete block generates pulses for carrie"
"r-based PWM (Pulse Width Modulation), self-commutated IGBTs,GTOs or FETs brid"
"ges.\n\nDepending on the number of bridge arms selected in the \"Generator Mo"
"de\" parameter, the block can be used either for single-phase or three-phase "
"PWM control.\n\nPress Help for details on input(s) and outputs.\n\nSee psb1ph"
"PWM and psb3phPWM demos respectively for application examples of single-phas"
"e and three-phase inverters using this block.\n\n "
MaskHelp "The output pulses are a vector (with values=0 o"
"r 1). Depending on the selected \"Generator Mode\", the output vector contain"
"s:\nFor a 1-arm bridge: Two pulses. Pulse 1 is for the upper switch and puls"
"e 2 is for the lower switch.\nFor a 2-arm bridge: Four pulses. Pulses 1 and "
"3 are respectively for the upper switches of the first and second arm. Pulses"
" 2 and 4 are for the lower switches.\nFor a 3-arm bridge: Six pulses. Pulses"
" 1,3 and 5 are respectively for the upper switches of the first,second and th"
"ird arm. Pulses 2,4 and 6 are for the lower switches.\nFor double 3-arm bridg"
"es: Twelve pulses.The first six pulses (pulses 1 to 6) must be sent to the fi"
"rst 3-arm bridge and the last six (pulses 7 to 12) to the second 3-arm bridge"
".\n\nBy selecting \"Internal generation\" you can can control the modulation "
"index m, frequency and phase of the output voltage from the internal paramet"
"ers (m, Freq and Phase). Otherwise, external signals are used for pulse gener"
"ation. The width of the input vector must be 1 for single phase bridges ( 1-a"
"rm or 2-arm) and 3 for 3-phase bridges (single or double bridge)."
MaskPromptString "Generator Mode|Carrier frequency (Hz):|Sample t"
"ime:|Internal generation of modulating signal(s)|Modulation index (0<m<1) :|"
"Frequency of output voltage (Hz)|Phase of output voltage (degrees)"
MaskStyleString "popup(1-arm bridge (2 pulses)|2-arm bridge (4"
" pulses)|3-arm bridge (6 pulses)|Double 3-arm bridges (12 pulses)),edit,edi"
"t,checkbox,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on,on,on"
MaskCallbackString "|||powericon('psbcbtransfo',gcb,'Discrete PWM G"
"enerator',[])|||"
MaskEnableString "on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,off,off,off"
MaskToolTipString "on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,"
MaskVariables "GeneratorMode=@1;Fc=@2;Ts=@3;Internal=@4;mIndex"
"=@5;Freq=@6;Phase=@7;"
MaskInitialization "powericon('psbcbtransfo',gcb,'Discrete PWM Gene"
"rator')\nif Freq==0\n Phase=90;\nend\nswitch GeneratorMode\ncase 1,\n I"
"nternal_Phase=0;\n Signal_PortWidth=1;\n Select1_Elements=[1 2];\n Sele"
"ct1_PortWidth=2;\n Select3_Elements=[1 2];\n Select3_PortWidth=4;\ncase 2"
",\n Internal_Phase=0;\n Signal_PortWidth=1;\n Select1_Elements=[1 2]"
";\n Select1_PortWidth=2;\n Select3_Elements=[1 2 3 4];\n Select3_Por"
"tWidth=4;\ncase 3,\n Internal_Phase=[0 -2*pi/3 2*pi/3];\n Signal_PortWi"
"dth=3;\n Select1_Elements=[1 4 2 5 3 6];\n Select1_PortWidth=6;\n Sel"
"ect3_Elements=[1 2 3 4 5 6];\n Select3_PortWidth=12;\ncase 4,\n Internal"
"_Phase=[0 -2*pi/3 2*pi/3];\n Signal_PortWidth=3;\n Select1_Elements=[1 "
"4 2 5 3 6];\n Select1_PortWidth=6;\n Select3_Elements=[1 2 3 4 5 6 7 8 9"
" 10 11 12];\n Select3_PortWidth=12;\nend"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "2-arm bridge (4 pulses)|1080|Ts|off|0.68|50|0"
MaskTabNameString ",,,,,,"
System {
Name "Discrete\nPWM Generator"
Location [42, 233, 997, 807]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Signal(s)"
Position [70, 363, 100, 377]
Port "1"
IconDisplay "Port number"
LatchInput off
}
Block {
BlockType Logic
Name "BL4"
Ports [1, 1]
Position [625, 269, 655, 291]
NamePlacement "alternate"
ShowName off
Operator "NOT"
Inputs "1"
}
Block {
BlockType Logic
Name "BL5"
Ports [1, 1]
Position [625, 374, 655, 396]
NamePlacement "alternate"
ShowName off
Operator "NOT"
Inputs "1"
}
Block {
BlockType Constant
Name "Constant"
Position [35, 275, 155, 305]
ShowName off
Value "Internal_Phase"
}
Block {
BlockType Constant
Name "Constant1"
Position [295, 329, 340, 351]
ShowName off
Value "Internal"
}
Block {
BlockType DataTypeConversion
Name "Data Type \nConversion"
Position [862, 355, 888, 375]
Orientation "down"
BackgroundColor "cyan"
ShowName off
OutDataTypeMode "double"
}
Block {
BlockType DataTypeConversion
Name "Data Type \nConversion1"
Position [565, 240, 585, 260]
BackgroundColor "cyan"
ShowName off
OutDataTypeMode "boolean"
}
Block {
BlockType DataTypeConversion
Name "Data Type \nConversion2"
Position [565, 345, 585, 365]
BackgroundColor "cyan"
ShowName off
OutDataTypeMode "boolean"
}
Block {
BlockType Gain
Name "Gain"
Position [100, 149, 165, 191]
ShowName off
Gain "2*pi*Freq"
}
Block {
BlockType Gain
Name "Gain2"
Position [110, 211, 160, 249]
ShowName off
Gain "pi/180"
}
Block {
BlockType Gain
Name "Gain3"
Position [450, 325, 485, 355]
ShowName off
Gain "-1"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [690, 235, 695, 295]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [690, 340, 695, 400]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [795, 285, 800, 345]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [310, 198, 340, 242]
ShowName off
RndMeth "Floor"
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [515, 222, 545, 273]
ShowName off
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator1"
Position [515, 327, 545, 378]
ShowName off
}
Block {
BlockType Selector
Name "Select1A"
Ports [1, 1]
Position [725, 249, 755, 281]
Elements "Select1_Elements"
InputPortWidth "Select1_PortWidth"
}
Block {
BlockType Selector
Name "Select1B"
Ports [1, 1]
Position [725, 354, 755, 386]
Elements "Select1_Elements"
InputPortWidth "Select1_PortWidth"
}
Block {
BlockType Selector
Name "Select3"
Ports [1, 1]
Position [830, 299, 860, 331]
Elements "Select3_Elements"
InputPortWidth "Select3_PortWidth"
}
Block {
BlockType Sum
Name "Sum"
Ports [3, 1]
Position [200, 138, 235, 322]
ShowName off
Inputs "+++"
}
Block {
BlockType Switch
Name "Switch"
Position [380, 294, 415, 386]
ShowName off
Threshold "0.5"
}
Block {
BlockType Reference
Name "Triangle"
Ports [0, 1]
Position [450, 420, 480, 450]
SourceBlock "simulink/Sources/Repeating\nSequence"
SourceType "Repeating table"
ShowPortLabels on
rep_seq_t "[0 1/Fc/4 3/Fc/4 1/Fc]"
rep_seq_y "[0 -1 1 0]"
}
Block {
BlockType Trigonometry
Name "Trigonometric\nFunction"
Ports [1, 1]
Position [255, 217, 285, 243]
ShowName off
}
Block {
BlockType Constant
Name "m3"
Position [35, 220, 75, 240]
ShowName off
Value "Phase"
}
Block {
BlockType Constant
Name "m4"
Position [35, 110, 75, 130]
ShowName off
Value "mIndex"
}
Block {
BlockType DigitalClock
Name "t"
Position [30, 159, 65, 181]
SampleTime "Ts"
}
Block {
BlockType Outport
Name "Pulses"
Position [890, 398, 920, 412]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [10, 0]
Branch {
DstBlock "Gain3"
DstPort 1
}
Branch {
Points [0, -105]
DstBlock "Relational\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "Select3"
DstPort 1
}
Line {
SrcBlock "Select1B"
SrcPort 1
Points [20, 0]
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "Select1A"
SrcPort 1
Points [20, 0]
DstBlock "Mux2"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "Select1B"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Select1A"
DstPort 1
}
Line {
SrcBlock "BL5"
SrcPort 1
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "BL4"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Gain3"
SrcPort 1
DstBlock "Relational\nOperator1"
DstPort 1
}
Line {
SrcBlock "Triangle"
SrcPort 1
Points [10, 0; 0, -70]
Branch {
DstBlock "Relational\nOperator1"
DstPort 2
}
Branch {
Points [0, -105]
DstBlock "Relational\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Product"
SrcPort 1
Points [15, 0; 0, 90]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Signal(s)"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Trigonometric\nFunction"
SrcPort 1
DstBlock "Product"
DstPort 2
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -