📄 mli2niveauxmli.mdl
字号:
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [270, 78, 295, 107]
ShowName off
Inputs "-+"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [500, 84, 520, 106]
BackgroundColor "lightBlue"
ShowName off
SampleTime "Ts"
}
Block {
BlockType Outport
Name "Varef"
Position [550, 83, 580, 97]
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Discrete\nPI Controller"
DstPort 1
}
Line {
SrcBlock "Ir1ref"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Ir1"
SrcPort 1
Points [35, 0; 0, 35]
DstBlock "Sum1"
DstPort 1
}
Line {
Name " Ud"
Labels [0, 0]
SrcBlock "Discrete\nPI Controller"
SrcPort 1
DstBlock "Gain"
DstPort 1
}
Line {
SrcBlock "Gain"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [0, -5]
DstBlock "Varef"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "\nRegulation tension"
Ports [3, 1]
Position [150, 116, 315, 214]
BackgroundColor "cyan"
NamePlacement "alternate"
FontName "Arial"
FontSize 14
FontWeight "bold"
TreatAsAtomicUnit off
System {
Name "\nRegulation tension"
Location [123, 217, 1079, 608]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "V_ref"
Position [220, 93, 250, 107]
ForegroundColor "green"
}
Block {
BlockType Inport
Name "Vdc"
Position [195, 48, 225, 62]
ForegroundColor "green"
Port "2"
}
Block {
BlockType Inport
Name "sin"
Position [245, 193, 275, 207]
ForegroundColor "red"
Port "3"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 3]
Position [300, 181, 305, 219]
ForegroundColor "red"
BackgroundColor "red"
ShowName off
Outputs "3"
}
Block {
BlockType SubSystem
Name "Discrete\nPI Controller"
Ports [1, 1]
Position [395, 72, 440, 118]
ForegroundColor "green"
AncestorBlock "powerlib_extras/Discrete \nControl Bloc"
"ks/Discrete\nPI Controller"
TreatAsAtomicUnit off
MaskType "Discrete PI Controller"
MaskDescription "This block implements a discrete PI con"
"troller."
MaskPromptString "Proportional gain (Kp):|Integral gain ("
"Ki):|Output limits: [ Upper Lower ]|Output initial value:|Sample time:"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,on,on,on"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "Kp=@1;Ki=@2;Par_Limits=@3;Init=@4;Ts=@5"
";"
MaskInitialization "UpperLimit=Par_Limits(1);\nLowerLimit=P"
"ar_Limits(2);"
MaskDisplay "disp('PI');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "Kp|Ki|[80 -80]|0|Ts"
Port {
PortNumber 1
Name " I*"
TestPoint off
LinearAnalysisOutput off
LinearAnalysisInput off
RTWStorageClass "Auto"
DataLogging off
DataLoggingNameMode "SignalName"
DataLoggingDecimateData off
DataLoggingDecimation "2"
DataLoggingLimitDataPoints off
DataLoggingMaxPoints "5000"
}
System {
Name "Discrete\nPI Controller"
Location [198, 391, 965, 739]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "Error"
Position [100, 183, 130, 197]
FontSize 12
FontWeight "bold"
}
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator"
Ports [1, 1]
Position [365, 171, 425, 209]
ShowName off
IntegratorMethod "Forward Euler"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "Init"
LimitOutput on
UpperSaturationLimit "UpperLimit"
LowerSaturationLimit "LowerLimit"
SampleTime "Ts"
}
Block {
BlockType Gain
Name "Kp4"
Position [225, 124, 260, 156]
ShowName off
Gain "Kp"
}
Block {
BlockType Gain
Name "Kp5"
Position [230, 174, 265, 206]
ShowName off
Gain "Ki"
}
Block {
BlockType Saturate
Name "Saturation2"
Position [565, 150, 590, 180]
NamePlacement "alternate"
ShowName off
UpperLimit "UpperLimit"
LowerLimit "LowerLimit"
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [490, 114, 520, 221]
ShowName off
}
Block {
BlockType Outport
Name "Out"
Position [630, 158, 660, 172]
FontSize 12
FontWeight "bold"
InitialOutput "0"
}
Line {
SrcBlock "Discrete-Time\nIntegrator"
SrcPort 1
DstBlock "Sum6"
DstPort 2
}
Line {
SrcBlock "Kp4"
SrcPort 1
DstBlock "Sum6"
DstPort 1
}
Line {
SrcBlock "Kp5"
SrcPort 1
DstBlock "Discrete-Time\nIntegrator"
DstPort 1
}
Line {
SrcBlock "Sum6"
SrcPort 1
DstBlock "Saturation2"
DstPort 1
}
Line {
SrcBlock "Error"
SrcPort 1
Points [65, 0]
Branch {
DstBlock "Kp5"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "Kp4"
DstPort 1
}
}
Line {
SrcBlock "Saturation2"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Annotation {
Name "Discrete PID Controller"
Position [111, 43]
FontSize 12
FontWeight "bold"
}
Annotation {
Name "Pierre Giroux, Gilbert Sybille\nPow"
"er System Simulation Laboratory\nIREQ, Hydro-Quebc"
Position [112, 76]
}
Annotation {
Position [102, 51]
}
Annotation {
Position [101, 18]
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [730, 132, 735, 288]
ForegroundColor "cyan"
ShowName off
Inputs "3"
}
Block {
BlockType Product
Name "Product3"
Ports [2, 1]
Position [640, 141, 655, 179]
ForegroundColor "cyan"
BackgroundColor "[0.000000, 0.501961, 1.000000]"
ShowName off
InputSameDT off
}
Block {
BlockType Product
Name "Product4"
Ports [2, 1]
Position [640, 191, 655, 229]
ForegroundColor "cyan"
BackgroundColor "[0.000000, 0.501961, 1.000000]"
ShowName off
InputSameDT off
}
Block {
BlockType Product
Name "Product5"
Ports [2, 1]
Position [640, 241, 655, 279]
ForegroundColor "cyan"
BackgroundColor "[0.000000, 0.501961, 1.000000]"
ShowName off
InputSameDT off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [340, 78, 365, 107]
ForegroundColor "green"
ShowName off
Inputs "-+"
}
Block {
BlockType Outport
Name "Iabc_ref"
Position [855, 208, 885, 222]
ForegroundColor "cyan"
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Discrete\nPI Controller"
DstPort 1
}
Line {
SrcBlock "V_ref"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Vdc"
SrcPort 1
Points [40, 0; 0, 30]
DstBlock "Sum1"
DstPort 1
}
Line {
Name " I*"
Labels [0, 0]
SrcBlock "Discrete\nPI Controller"
SrcPort 1
Points [95, 0; 0, 75]
Branch {
DstBlock "Product3"
DstPort 2
}
Branch {
Points [0, 50]
Branch {
DstBlock "Product4"
DstPort 2
}
Branch {
Points [0, 50]
DstBlock "Product5"
DstPort 2
}
}
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [0, 15; 140, 0; 0, 25]
DstBlock "Product5"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "Product4"
DstPort 1
}
Line {
SrcBlock "Product3"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Product4"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Product5"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Mux"
SrcPort 1
Points [50, 0; 0, 5]
DstBlock "Iabc_ref"
DstPort 1
}
Line {
SrcBlock "sin"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [0, -40]
DstBlock "Product3"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Constant5"
Position [40, 111, 100, 129]
ForegroundColor "blue"
BackgroundColor "[0.000000, 0.501961, 1.000000]"
ShowName off
Value "VREF"
}
Block {
BlockType Gain
Name "Gain"
Position [75, 238, 105, 262]
ForegroundColor "red"
ShowName off
Gain "1/77"
}
Block {
BlockType Goto
Name "Goto1"
Position [105, 31, 160, 49]
ForegroundColor "darkGreen"
ShowName off
GotoTag "Vref"
TagVisibility "global"
}
Block {
BlockType Outport
Name "Vr123ref"
Position [695, 163, 725, 177]
}
Line {
SrcBlock "Vdc"
SrcPort 1
DstBlock "\nRegulation tension"
DstPort 2
}
Line {
SrcBlock "Gain"
SrcPort 1
Points [0, -40; 15, 0; 0, -15]
DstBlock "\nRegulation tension"
DstPort 3
}
Line {
SrcBlock "\nRegulation tension"
SrcPort 1
Points [20, 0; 0, -20]
DstBlock "\nRegulation courant"
DstPort 1
}
Line {
SrcBlock "Ir123"
SrcPort 1
Points [10, 0; 0, -15]
Branch {
Points [0, 20; 380, 0]
DstBlock "\nRegulation courant"
DstPort 2
}
Branch {
Points [-10, 0; 0, -110]
DstBlock "Gain"
DstPort 1
}
}
Line {
SrcBlock "\nRegulation courant"
SrcPort 1
DstBlock "Vr123ref"
DstPort 1
}
Line {
SrcBlock "Constant5"
SrcPort 1
Points [10, 0]
Branch {
Points [5, 0; 0, 15]
DstBlock "\nRegulation tension"
DstPort 1
}
Branch {
Points [-25, 0]
DstBlock "Goto1"
DstPort 1
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -