📄 apf_zhaoyu01.mdl
字号:
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
FilterType "Lowpass"
N "2"
Fo "25"
Bo "80"
Ts "2e-6"
Initialize off
Vac_Init "[1.2 60 50]"
Vdc_Init "-0.6"
PlotResponse off
param1 "[1 500 0.1]"
}
Block {
BlockType Reference
Name "Discrete \nButterworth Filter1"
Ports [1, 1]
Position [260, 280, 290, 300]
ForegroundColor "gray"
DialogController "POWERSYS.PowerSysDialog"
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete \nButterworth Filter\n"
SourceType "Discrete Butterworth Filter"
ShowPortLabels "FromPortIcon"
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
FilterType "Lowpass"
N "2"
Fo "25"
Bo "80"
Ts "2e-6"
Initialize off
Vac_Init "[1.2 60 50]"
Vdc_Init "-0.6"
PlotResponse off
param1 "[1 500 0.1]"
}
Block {
BlockType Fcn
Name "Fcn"
Position [805, 238, 830, 262]
ShowName off
Expr "u==0"
}
Block {
BlockType Fcn
Name "Fcn1"
Position [805, 298, 830, 322]
ShowName off
Expr "u==0"
}
Block {
BlockType Fcn
Name "Fcn2"
Position [805, 358, 830, 382]
ShowName off
Expr "u==0"
}
Block {
BlockType Memory
Name "Memory"
Position [885, 282, 910, 308]
}
Block {
BlockType Mux
Name "Mux"
Ports [6, 1]
Position [855, 210, 860, 380]
ShowName off
Inputs "6"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [640, 310, 645, 390]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [400, 200, 405, 300]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux4"
Ports [2, 1]
Position [240, 84, 245, 131]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "PI "
Ports [1, 1]
Position [250, 39, 275, 61]
AncestorBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\nPI Controller"
DialogController "POWERSYS.PowerSysDialog"
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."
MaskHelp "This block is part of a subset of blocks in the Extras library that does not have documentation associ"
"ated with it, other than the block mask description."
MaskPromptString "Proportional gain (Kp):|Integral gain (Ki):|Output limits: [ Upper Lower ]|Output initial val"
"ue:|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);\npower_initmask();"
MaskDisplay "disp('PI');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskPortRotate "default"
MaskIconUnits "autoscale"
MaskValueString "2|20|[1000 -1000]|0|1e-5"
MaskTabNameString ",,,,"
System {
Name "PI "
Location [2, 78, 1022, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
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 [560, 150, 585, 180]
NamePlacement "alternate"
ShowName off
UpperLimit "UpperLimit"
LowerLimit "LowerLimit"
}
Block {
BlockType Sum
Name "Sum6"
Ports [2, 1]
Position [490, 116, 520, 214]
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 Relay
Name "Relay"
Position [735, 211, 765, 229]
ShowName off
OnSwitchValue "1"
OffSwitchValue "-1"
OnOutputValue "0"
OffOutputValue "1"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Relay
Name "Relay1"
Position [735, 271, 765, 289]
ShowName off
OnSwitchValue "1"
OffSwitchValue "-1"
OnOutputValue "0"
OffOutputValue "1"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Relay
Name "Relay2"
Position [735, 331, 765, 349]
ShowName off
OnSwitchValue "1"
OffSwitchValue "-1"
OnOutputValue "0"
OffOutputValue "1"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Scope
Name "Scope"
Ports [1]
Position [285, 92, 310, 128]
Floating off
Location [5, 52, 1029, 737]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "0.2"
YMin "696.5"
YMax "701.5"
SaveName "a"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Scope
Name "Scope1"
Ports [1]
Position [675, 332, 700, 368]
Floating off
Location [5, 52, 1029, 737]
Open off
NumInputPorts "1"
ZoomMode "xonly"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
TimeRange "0.2"
YMin "-125"
YMax "150"
SaveName "a0"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [2, 2]
Position [165, 179, 210, 326]
ShowName off
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "Subsystem"
Location [2, 82, 1014, 721]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Iload"
Position [345, 98, 375, 112]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "U_B"
Position [275, 208, 305, 222]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "abc_dq"
Ports [2, 2]
Position [445, 81, 495, 179]
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents off
System {
Name "abc_dq"
Location [2, 82, 1014, 721]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "abc"
Position [85, 53, 115, 67]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "jiao"
Position [45, 118, 75, 132]
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [165, 183, 180, 227]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^-10"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Add1"
Ports [2, 1]
Position [160, 263, 175, 307]
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -