📄 hybrid_power_system.mdl
字号:
BlockType TransferFcn
Name "Controller"
Position [535, 222, 595, 258]
Denominator "[20 1]"
}
Block {
BlockType Gain
Name "Diesel\nGenerator \nGain"
Position [381, 335, 419, 370]
Orientation "up"
NamePlacement "alternate"
Gain "4"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
ParamDataTypeStr "Inherit: Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType TransferFcn
Name "Diesel \nGenerator"
Position [635, 222, 695, 258]
Denominator "[2 1]"
}
Block {
BlockType TransferFcn
Name "Fuel Cell"
Position [590, 142, 650, 178]
Denominator "[4 1]"
}
Block {
BlockType Gain
Name "Fuel Cell\nGenerator Gain"
Position [294, 335, 336, 370]
Orientation "up"
NamePlacement "alternate"
ParameterDataTypeMode "Inherit via internal rule"
ParameterDataType "sfix(16)"
ParameterScaling "2^0"
ParamDataTypeStr "Inherit: Inherit via internal rule"
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Fuel Cell\nPI Controller"
Ports [1, 1]
Position [455, 137, 500, 183]
DialogController "POWERSYS.PowerSysDialog"
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\nPI Controller"
SourceType "Discrete PI Controller"
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"
Kp "1.5"
Ki "0.0155"
Par_Limits "[0.3 0]"
Init "0"
Ts "10e-3"
}
Block {
BlockType Reference
Name "Generator\nPI Controller"
Ports [1, 1]
Position [455, 217, 500, 263]
DialogController "POWERSYS.PowerSysDialog"
SourceBlock "powerlib_extras/Discrete \nControl Blocks/Discrete\nPI Controller"
SourceType "Discrete PI Controller"
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"
Kp "0.1"
Ki ".002"
Par_Limits "[0.8 0]"
Init "0"
Ts "10e-3"
}
Block {
BlockType TransferFcn
Name "Power System"
Position [815, 167, 875, 203]
Denominator "[.2 .012]"
}
Block {
BlockType Scope
Name "Scope"
Ports [4]
Position [960, 154, 990, 186]
Floating off
Location [5, 52, 1281, 769]
Open on
NumInputPorts "4"
List {
ListType AxesTitles
axes1 "Load"
axes2 "Fuel Generator"
axes3 "Diesel Generator"
axes4 "Delta f"
}
YMin "0.9~0~0~-1.5"
YMax "1~0.25~0.06~1.25"
DataFormat "StructureWithTime"
LimitDataPoints off
SampleTime "0"
}
Block {
BlockType Step
Name "Step change in load"
Position [90, 145, 120, 175]
Time "300"
Before "0.9"
SampleTime "0"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [305, 150, 325, 170]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum1"
Ports [2, 1]
Position [390, 230, 410, 250]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum2"
Ports [3, 1]
Position [715, 165, 745, 205]
ShowName off
IconShape "round"
Inputs "|+++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum3"
Ports [2, 1]
Position [190, 150, 210, 170]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum4"
Ports [2, 1]
Position [770, 170, 800, 210]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutDataType "sfix(16)"
OutScaling "2^0"
OutDataTypeStr "Inherit: Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Wind \nGeneration"
Position [675, 85, 705, 115]
Value "0.8"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Line {
SrcBlock "Fuel Cell\nGenerator Gain"
SrcPort 1
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Diesel \nGenerator"
SrcPort 1
Points [-5, 0]
Branch {
Points [35, 0]
DstBlock "Sum2"
DstPort 3
}
Branch {
Points [15, 0; 0, 30; 185, 0; 0, -95]
DstBlock "Scope"
DstPort 3
}
}
Line {
SrcBlock "Fuel Cell"
SrcPort 1
Points [0, -10; 5, 0]
Branch {
Points [20, 0; 0, 50; 22, 0]
DstBlock "Sum2"
DstPort 2
}
Branch {
Points [0, -75; 255, 0; 0, 90]
DstBlock "Scope"
DstPort 2
}
}
Line {
SrcBlock "Diesel\nGenerator \nGain"
SrcPort 1
DstBlock "Sum1"
DstPort 2
}
Line {
SrcBlock "Power System"
SrcPort 1
Points [5, 0]
Branch {
DstBlock "Scope"
DstPort 4
}
Branch {
Points [0, 220; -485, 0]
Branch {
Points [-85, 0]
DstBlock "Fuel Cell\nGenerator Gain"
DstPort 1
}
Branch {
DstBlock "Diesel\nGenerator \nGain"
DstPort 1
}
}
}
Line {
SrcBlock "Sum1"
SrcPort 1
DstBlock "Generator\nPI Controller"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Fuel Cell\nPI Controller"
DstPort 1
}
Line {
SrcBlock "Wind \nGeneration"
SrcPort 1
Points [5, 0; 0, 55; -13, 0]
DstBlock "Sum2"
DstPort 1
}
Line {
SrcBlock "Step change in load"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Sum3"
DstPort 1
}
Branch {
Points [0, 265; 635, 0]
DstBlock "Sum4"
DstPort 2
}
Branch {
Points [0, -95; 785, 0; 0, 90]
DstBlock "Scope"
DstPort 1
}
}
Line {
SrcBlock "Sum3"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, 80]
DstBlock "Sum1"
DstPort 1
}
}
Line {
SrcBlock "Sum4"
SrcPort 1
Points [-5, 0]
DstBlock "Power System"
DstPort 1
}
Line {
SrcBlock "Sum2"
SrcPort 1
Points [0, 5]
Branch {
DstBlock "Sum4"
DstPort 1
}
Branch {
Points [0, 110; -550, 0]
DstBlock "Sum3"
DstPort 2
}
}
Line {
SrcBlock "Generator\nPI Controller"
SrcPort 1
DstBlock "Controller"
DstPort 1
}
Line {
SrcBlock "Controller"
SrcPort 1
DstBlock "Diesel \nGenerator"
DstPort 1
}
Line {
SrcBlock "Fuel Cell\nPI Controller"
SrcPort 1
DstBlock "Fuel Cell"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -