d8.mdl
来自「实现了两电平逆变器上异步电机直接转矩控制仿真,引入了一种典型的直接转矩控制改进算」· MDL 代码 · 共 2,664 行 · 第 1/5 页
MDL
2,664 行
}
Branch {
DstBlock "Product1"
DstPort 2
}
}
}
}
Block {
BlockType SubSystem
Name "Subsystem2"
Ports [1, 2]
Position [565, 333, 610, 402]
NamePlacement "alternate"
ShowName off
TreatAsAtomicUnit off
System {
Name "Subsystem2"
Location [30, 208, 822, 742]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "ABC"
Position [55, 88, 85, 102]
}
Block {
BlockType Fcn
Name "Fcn"
Position [170, 60, 230, 90]
Expr "u[1]-0.5*u[2]-0.5*u[3]"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [170, 120, 230, 150]
Expr "0.86602*u[2]-0.86602*u[3]"
}
Block {
BlockType Gain
Name "Gain"
Position [270, 60, 300, 90]
Gain "sqrt(2/3)"
}
Block {
BlockType Gain
Name "Gain1"
Position [270, 120, 300, 150]
Gain "sqrt(2/3)"
}
Block {
BlockType Outport
Name "alfa"
Position [335, 68, 365, 82]
}
Block {
BlockType Outport
Name "belta"
Position [345, 128, 375, 142]
Port "2"
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "alfa"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "belta"
DstPort 1
}
Line {
SrcBlock "ABC"
SrcPort 1
Points [40, 0]
Branch {
Points [0, -20]
DstBlock "Fcn"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Fcn1"
DstPort 1
}
}
}
}
Block {
BlockType SubSystem
Name "Subsystem4"
Ports [1, 1]
Position [315, 314, 370, 366]
ShowName off
TreatAsAtomicUnit off
System {
Name "Subsystem4"
Location [2, 74, 790, 555]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "state"
Position [50, 83, 80, 97]
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [255, 54, 275, 76]
ShowName off
DataType "boolean"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion1"
Position [255, 114, 275, 136]
ShowName off
DataType "boolean"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion2"
Position [250, 173, 275, 197]
ShowName off
DataType "boolean"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion3"
Position [345, 54, 365, 76]
ShowName off
DataType "double"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion4"
Position [350, 114, 370, 136]
ShowName off
DataType "double"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion5"
Position [350, 174, 370, 196]
ShowName off
DataType "double"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [135, 16, 140, 164]
BackgroundColor "black"
ShowName off
Outputs "3"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [1, 1]
Position [300, 56, 320, 74]
ShowName off
Operator "NOT"
AllPortsSameDT off
}
Block {
BlockType Logic
Name "Logical\nOperator1"
Ports [1, 1]
Position [300, 116, 320, 134]
ShowName off
Operator "NOT"
AllPortsSameDT off
}
Block {
BlockType Logic
Name "Logical\nOperator2"
Ports [1, 1]
Position [300, 176, 320, 194]
ShowName off
Operator "NOT"
AllPortsSameDT off
}
Block {
BlockType Mux
Name "Mux"
Ports [6, 1]
Position [405, 25, 410, 195]
ShowName off
Inputs "6"
}
Block {
BlockType Outport
Name "pulse"
Position [480, 103, 510, 117]
}
Line {
SrcBlock "state"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion3"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Data Type Conversion3"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion4"
SrcPort 1
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "Logical\nOperator1"
SrcPort 1
DstBlock "Data Type Conversion4"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion1"
SrcPort 1
DstBlock "Logical\nOperator1"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion5"
SrcPort 1
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "Logical\nOperator2"
SrcPort 1
DstBlock "Data Type Conversion5"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion2"
SrcPort 1
DstBlock "Logical\nOperator2"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "pulse"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [90, 0]
Branch {
Points [30, 0; 0, -5]
DstBlock "Mux"
DstPort 1
}
Branch {
Points [0, 25]
DstBlock "Data Type Conversion"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [95, 0]
Branch {
Points [25, 0; 0, 5]
DstBlock "Mux"
DstPort 3
}
Branch {
DstBlock "Data Type Conversion1"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [90, 0]
Branch {
Points [30, 0; 0, 15]
DstBlock "Mux"
DstPort 5
}
Branch {
DstBlock "Data Type Conversion2"
DstPort 1
}
}
}
}
Block {
BlockType SubSystem
Name "Subsystem5"
Ports [1, 2]
Position [565, 253, 610, 322]
NamePlacement "alternate"
ShowName off
TreatAsAtomicUnit off
System {
Name "Subsystem5"
Location [30, 208, 822, 742]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "ABC"
Position [55, 88, 85, 102]
}
Block {
BlockType Fcn
Name "Fcn"
Position [170, 60, 230, 90]
Expr "u[1]-0.5*u[2]-0.5*u[3]"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [170, 120, 230, 150]
Expr "0.86602*u[2]-0.86602*u[3]"
}
Block {
BlockType Gain
Name "Gain"
Position [270, 60, 300, 90]
Gain "sqrt(2/3)"
}
Block {
BlockType Gain
Name "Gain1"
Position [270, 120, 300, 150]
Gain "sqrt(2/3)"
}
Block {
BlockType Outport
Name "alfa"
Position [335, 68, 365, 82]
}
Block {
BlockType Outport
Name "belta"
Position [345, 128, 375, 142]
Port "2"
}
Line {
SrcBlock "Fcn"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "alfa"
DstPort 1
}
Line {
SrcBlock "Fcn1"
SrcPort 1
DstBlock "Gain1"
DstPort 1
}
Line {
SrcBlock "Gain1"
SrcPort 1
DstBlock "belta"
DstPort 1
}
Line {
SrcBlock "ABC"
SrcPort 1
Points [40, 0]
Branch {
Points [0, -20]
DstBlock "Fcn"
DstPort 1
}
Branch {
Points [0, 40]
DstBlock "Fcn1"
DstPort 1
}
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [425, 25, 445, 65]
ShowName off
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Step
Name "TL"
Position [350, 65, 380, 95]
Time "0"
After "0"
SampleTime "0"
}
Block {
BlockType Step
Name "TL1"
Position [345, 20, 375, 50]
Time "0.06"
After "5"
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Three-Phase\nV-I Measurement"
Tag "PoWeRsYsTeMmEaSuReMeNt"
Ports [3, 5]
Position [480, 260, 515, 340]
AncestorBlock "powerlib2/Measurements/Three-Phase\nV-I Measure"
"ment"
CopyFcn " powericon('psbloadfunction',gcbh,'3-Phase VI "
"Measurement','VerifyPhasor'); "
LoadFcn "powericon('psbloadfunction',gcbh,'3-Phase VI Me"
"asurement','');"
InitFcn "powericon('checksum',bdroot)"
CloseFcn "%3phaseVImeasurement"
TreatAsAtomicUnit off
MaskType "3-Phase VI Measurement"
MaskDescription "This block is used to measure three-phase volta"
"ges and currents in a circuit. When connected in series with a three-phase el"
"ement, it return the three phase-to-ground voltages and line currents.\n\nThe"
" block can output the voltages and currents in per unit values or in volts an"
"d amperes. Check the appropriate boxes if you want to output the voltages and"
" currents in pu"
MaskHelp "web(psbhelp)"
MaskPromptString "Voltage measurement|Use a label |Signal label "
"(use a From block to collect signal)|Voltage in pu|Base voltage (Vrms phase-"
"phase) :|Current measurement|Use a label|Signal label (use a From block to c"
"ollect signal)|Currents in pu|Base power ( VA 3 phase)|Output signal :|Phasor"
" simulation|Equivalent circuit|PSBOutputType"
MaskStyleString "popup(no|phase-to-ground|phase-to-phase),checkb"
"ox,edit,checkbox,edit,popup(no|yes),checkbox,edit,checkbox,edit,popup(Complex"
"|Real-Imag|Magnitude-Angle|Magnitude),checkbox,edit,edit"
MaskTunableValueString "off,off,off,on,on,off,off,off,on,on,on,on,on,on"
MaskCallbackString "powericon('psbcallbacks',gcb,'Three-phase measu"
"rements',2);|powericon('psbcallbacks',gcb,'Three-phase measurements',2);||pow"
"ericon('psbcallbacks',gcb,'Three-phase measurements',2);||powericon('psbcallb"
"acks',gcb,'Three-phase measurements',2);|powericon('psbcallbacks',gcb,'Three-"
"phase measurements',2);||powericon('psbcallbacks',gcb,'Three-phase measuremen"
"ts',4);|||||"
MaskEnableString "on,on,on,on,on,on,on,on,on,on,off,on,off,on"
MaskVisibilityString "on,on,off,on,off,on,on,off,on,off,on,off,off,of"
"f"
MaskToolTipString "on,on,on,on,on,on,on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,,,,,,,"
MaskVariables "VChoice=@1;ualv=@2;labelV=&3;Vpu=@4;Vbase=@5;IC"
"hoice=@6;ualc=@7;labelC=&8;Ppu=@9;Pbase=@10;OutputType=@11;PhasorSimulation=@"
"12;PSBequivalent=@13;PSBOutputType=&14;"
MaskInitialization "powericon('psbcallbacks',gcb,'Three-phase measu"
"rements',4);\nif Vpu\n xKv=1/(Vbase/sqrt(3)*sqrt(2));\nelse\n xKv=1;\n"
"end\nif Ppu\n xKi=1/(Pbase/Vbase/sqrt(3)*sqrt(2));\nelse\n xKi=1;\nend"
"\nswitch OutputType\ncase 1\n OutputSelection = [1:6];\n PhasorModeV ="
" [1:3];\n NormalModeV = [7:9];\n PhasorModeI = [4:6];\n NormalModeI "
"= [10:12];\n Kv = xKv;\n Ki = xKi;\ncase 2\n OutputSelection = [7,13"
",8,14,9,15,10,16,11,17,12,18];\n PhasorModeV = [1:6];\n NormalModeV = ["
"13:15];\n PhasorModeI = [7:12];\n NormalModeI = [16:18];\n Kv = xKv;"
"\n Ki = xKi;\ncase 3\n OutputSelection = [13,19,14,20,15,21,16,22,17,23"
",18,24];\n PhasorModeV = [1:6];\n NormalModeV = [13:15];\n PhasorMod"
"eI = [7:12];\n NormalModeI = [16:18];\n Kv = [xKv 1 xKv 1 xKv 1];\n "
"Ki = [xKi 1 xKi 1 xKi 1];\ncase 4\n OutputSelection = [19:24];\n Phaso"
"rModeV = [1:3];\n NormalModeV = [7:9];\n PhasorModeI = [4:6];\n Norm"
"alModeI = [10:12];\n Kv = xKv;\n Ki = xKi;\nend\nif PhasorSimulation\n "
" SelectionModeV = PhasorModeV;\n SelectionModeI = PhasorModeI;\nelse\n "
" SelectionModeV = NormalModeV;\n SelectionModeI = NormalModeI;\n Kv = "
"xKv;\n Ki = xKi;\nend"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "phase-to-phase|off|V1|off|0|yes|off|I1|off|0|Co"
"mplex|off|1|11100"
System {
Name "Three-Phase\nV-I Measurement"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?