📄 pi_thesis_40_1phase.mdl
字号:
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
Freq "50"
Phase "0"
Ts "1e-6"
}
Block {
BlockType Mux
Name "Mux"
Ports [3, 1]
Position [595, 127, 600, 203]
ShowName off
Inputs "3"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [110, 117, 115, 193]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "PI Controller d"
Ports [1, 1]
Position [475, 67, 520, 113]
BackgroundColor "lightBlue"
NamePlacement "alternate"
AncestorBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\nPI Controller"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskType "Discrete PI Controller"
MaskDescription "This block implements a discrete PI controller."
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=Par_Limits(2);"
MaskDisplay "disp('PI');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "40|154|[1e6 -1e6]|0|5e-6"
MaskTabNameString ",,,,"
System {
Name "PI Controller d"
Location [198, 391, 965, 739]
Open off
ModelBrowserVisibility on
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Error"
Position [100, 183, 130, 197]
FontSize 12
FontWeight "bold"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator"
Ports [1, 1]
Position [365, 171, 425, 209]
ShowName off
IntegratorMethod "Integration: Forward Euler"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "Init"
SampleTime "Ts"
OutDataType "sfix(16)"
OutScaling "2^0"
LimitOutput on
UpperSaturationLimit "UpperLimit"
LowerSaturationLimit "LowerLimit"
ICPrevOutput "DiscIntNeverNeededParam"
ICPrevScaledInput "DiscIntNeverNeededParam"
}
Block {
BlockType Gain
Name "Kp4"
Position [225, 124, 260, 156]
ShowName off
Gain "Kp"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "Kp5"
Position [230, 174, 265, 206]
ShowName off
Gain "Ki"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
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, 216]
ShowName off
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Outport
Name "Out"
Position [630, 158, 660, 172]
FontSize 12
FontWeight "bold"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
InitialOutput "0"
}
Line {
SrcBlock "Saturation2"
SrcPort 1
DstBlock "Out"
DstPort 1
}
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
}
}
Annotation {
Name "Discrete PID Controller"
Position [111, 43]
FontSize 12
FontWeight "bold"
}
Annotation {
Name "Pierre Giroux, Gilbert Sybille\nPower System Simulation Laboratory\nIREQ, Hydro-Quebc"
Position [112, 76]
}
Annotation {
Position [102, 51]
}
Annotation {
Position [101, 18]
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "PI Controller q"
Ports [1, 1]
Position [475, 142, 520, 188]
BackgroundColor "lightBlue"
AncestorBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\nPI Controller"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
MaskType "Discrete PI Controller"
MaskDescription "This block implements a discrete PI controller."
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=Par_Limits(2);"
MaskDisplay "disp('PI');"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "25|260|[1e6 -1e6]|0|5e-6"
MaskTabNameString ",,,,"
System {
Name "PI Controller q"
Location [198, 391, 965, 739]
Open off
ModelBrowserVisibility on
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Error"
Position [100, 183, 130, 197]
FontSize 12
FontWeight "bold"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType DiscreteIntegrator
Name "Discrete-Time\nIntegrator"
Ports [1, 1]
Position [365, 171, 425, 209]
ShowName off
IntegratorMethod "Integration: Forward Euler"
ExternalReset "none"
InitialConditionSource "internal"
InitialCondition "Init"
SampleTime "Ts"
OutDataType "sfix(16)"
OutScaling "2^0"
LimitOutput on
UpperSaturationLimit "UpperLimit"
LowerSaturationLimit "LowerLimit"
ICPrevOutput "DiscIntNeverNeededParam"
ICPrevScaledInput "DiscIntNeverNeededParam"
}
Block {
BlockType Gain
Name "Kp4"
Position [225, 124, 260, 156]
ShowName off
Gain "Kp"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Gain
Name "Kp5"
Position [230, 174, 265, 206]
ShowName off
Gain "Ki"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
OutDataType "sfix(16)"
OutScaling "2^0"
}
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, 216]
ShowName off
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Outport
Name "Out"
Position [630, 158, 660, 172]
FontSize 12
FontWeight "bold"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
InitialOutput "0"
}
Line {
SrcBlock "Saturation2"
SrcPort 1
DstBlock "Out"
DstPort 1
}
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
}
}
Annotation {
Name "Discrete PID Controller"
Position [111, 43]
FontSize 12
FontWeight "bold"
}
Annotation {
Name "Pierre Giroux, Gilbert Sybille\nPower System Simulation Laboratory\nIREQ, Hydro-Quebc"
Position [112, 76]
}
Annotation {
Position [102, 51]
}
Annotation {
Position [101, 18]
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType Scope
Name "Scope1"
Ports [4]
Position [880, 359, 930, 416]
Floating off
Location [6, 52, 1030, 737]
Open off
NumInputPorts "4"
List {
ListType AxesTitles
axes1 "Ke PWM Generator"
axes2 "dq Kompensasi dan 0"
axes3 "Sensor Tegangan Beban Sensitif dq [pu]"
axes4 "Selisih Tegangan dq [pu]"
}
YMin "-4~0~-0.5~-5.55112e-017"
YMax "4~4~0.9~0.7"
SaveToWorkspace on
SaveName "dq0"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Selector
Name "Selector"
Ports [1, 1]
Position [235, 337, 270, 363]
InputPortWidth "3"
IndexOptions "Index vecto
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -