HeatpumpGasboilerSelection
HeatpumpGasboilerSelection (FB)
HeatpumpGasboilerSelection (FB)FUNCTION_BLOCK HeatpumpGasboilerSelection
Short description
Enablement of the gas boiler or the heat pump depending on various influencing factors. Influencing factors:
Current COP value of the heat pump
Cost of electrical energy (heat pump) in euros per kWh
Cost for natural gas supply (gas boiler) in euros per kWh
Efficiency of the heat pump (0.0 - 1.0)
Efficiency of the gas boiler (0.0 - 1.0)
The default settings of the internal characteristic curve match the COP curve W35-heating case of the WP Remeha E-HP AW 84. Typical application: Decision on enabling the gas boiler or the heat pump depending on the operating situation
Representation

Interfaces
Inputs
xEn
BOOL
TRUE
Enable / disable the function block (TRUE = enabled)
eCOPSource
eHeatpumpGasboilerSelection_COPSource
eHeatpumpGasboilerSelection_COPSource.Internal_Curve
Selection of the COP source (Internal_Curve, External_Input)
rSourceTempCOP
REAL
2.0
Current temperature of the heat source for the heat pump (air-water HP: outside temperature)
rExtCOP
REAL
4.0
External value of the coefficient of performance (COP) of the heat pump (typical: 2.0 - 7.0)
xExtError
BOOL
FALSE
External error state (FALSE = no error, TRUE = error)
xExtValidData
BOOL
FALSE
External input for the validity of the curve data (n) (FALSE = invalid)
Outputs
tRemainingTimeTestIntervall
TIME
T#0s
Remaining time until the next test time point
rCOPLimit
REAL
0.0
Threshold of the COP for enabling the heat pump (rCOP >= rCOPLimit: enable the heat pump)
rCOP
REAL
0.0
Current value of the coefficient of performance (COP) of the heat pump (typical: 2.0 - 7.0)
xCmdGasboiler
BOOL
FALSE
Enable / disable the gas boiler (TRUE = enabled)
xCmdHeatpump
BOOL
FALSE
Enable / disable the heat pump (TRUE = enabled)
xError
BOOL
FALSE
Error state (FALSE = no error, TRUE = error)
Setpoints / parameters
rEfficiencyGasboiler
REAL
0.9
Overall efficiency of heat production with the gas boiler
rEfficiencyHeatpump
REAL
0.9
Overall efficiency of heat production with the heat pump
rEnergyPriceGasboiler
REAL
0.20
Energy cost - gas (in euros / kWh of produced heat energy)
rEnergyPriceHeatpump
REAL
0.45
Energy cost - electricity (in euros / kWh)
tTimeTestIntervall
TIME
T#30M
Duration of the test interval
rCOP_Subst
REAL
3.5
Substitute value for the COP in case of error
rCOP_Min
REAL
1.0
Absolute minimum value of the COP
rCOP_Max
REAL
10.0
Absolute maximum value of the COP
rSP1_X
REAL
1.0
Support point 1 - X value
rSP1_Y
REAL
2.0
Support point 1 - Y value
rSP2_X
REAL
2.0
Support point 2 - X value
rSP2_Y
REAL
4.0
Support point 2 - Y value
rSP3_X
REAL
3.0
Support point 3 - X value
rSP3_Y
REAL
6.0
Support point 3 - Y value
rSP4_X
REAL
4.0
Support point 4 - X value
rSP4_Y
REAL
8.0
Support point 4 - Y value
rSP5_X
REAL
5.0
Support point 5 - X value
rSP5_Y
REAL
10.0
Support point 5 - Y value
rSP6_X
REAL
6.0
Support point 6 - X value
rSP6_Y
REAL
12.0
Support point 6 - Y value
rSP7_X
REAL
7.0
Support point 7 - X value
rSP7_Y
REAL
14.0
Support point 7 - Y value
rSP8_X
REAL
8.0
Support point 8 - X value
rSP8_Y
REAL
16.0
Support point 8 - Y value
rSP9_X
REAL
9.0
Support point 9 - X value
rSP9_Y
REAL
18.0
Support point 9 - Y value
rSP10_X
REAL
10.0
Support point 10 - X value
rSP10_Y
REAL
20.0
Support point 10 - Y value
Function description
The enablement of the heat generators gas boiler or heat pump is determined by a calculation taking into account the following influencing factors: 1) Current COP value of the heat pump 2) Cost of electrical energy (heat pump) in euros per kWh 3) Cost for natural gas supply (gas boiler) in euros per kWh 4) Efficiency of the heat pump (0.0 - 1.0) 5) Efficiency of the gas boiler (0.0 - 1.0) Only one heat generator is enabled at any time; the other is automatically disabled. This calculation is performed (condition: xEn = TRUE) if at least one of the following situations occurs: 1) Cyclically at interval tTimeTestIntervall 2) Once at a rising edge on the input xEn 3) Once after every restart 4) Once at every change of the COP source selection eCOPSource The COP value of the heat pump can be determined by an internally stored curve with 10 value pairs (eCOPSource = Internal_Curve, heat source temperature rSourceTempCOP) or by the external input rExtCOP (eCOPSource = External_Input, xExtError = FALSE, xExtValidData = TRUE). It is limited by the absolute bounds rCOP_Min or rCOP_Max and, if error-free, output at the rCOP output and used for the calculation. In case of error (eCOPSource = Internal_Curve: error in the input of the value pairs) or (eCOPSource = External_Input: xExtError = TRUE or xExtValidData = FALSE) the substitute value rCOP_Subst is used. The X-values of the 10 support points of the internal COP curve must meet the following boundary conditions: 1) The X-values must be either strictly increasing or strictly decreasing 2) Each X-value may only occur once 3) Two adjacent support points are each connected by a straight line At the output tRemainingTimeTestIntervall the remaining time until the next cyclic calculation is available. At the output rCOPLimit the threshold for switching to the gas boiler is available (rCOP < rCOPLimit: enable the gas boiler) In the disabled state (xEn = FALSE) the outputs take on sensible, constant values; no calculation is performed. At the output *xError* the current error state is available (xError = TRUE: error active). It is active if either the internal COP curve is faulty or the external error input xExtError is active (= TRUE).
CODESYS
InOut:
Input
xEn
BOOL
TRUE
Input
eCOPSource
eHeatpumpGasboilerSelection_COPSource
eHeatpumpGasboilerSelection_COPSource.Internal_Curve
Input
rSourceTempCOP
REAL
2.0
Input
rExtCOP
REAL
4.0
Input
xExtError
BOOL
FALSE
Input
xExtValidData
BOOL
FALSE
Output
tRemainingTimeTestIntervall
TIME
TIME#0ms
Output
rCOPLimit
REAL
0.0
Output
rCOP
REAL
0.0
Output
xCmdGasboiler
BOOL
FALSE
Output
xCmdHeatpump
BOOL
FALSE
Output
xError
BOOL
FALSE
Input Const
rSP10_Y
REAL
6.8
Input Const
rSP10_X
REAL
20.0
Input Const
rSP9_Y
REAL
5.85
Input Const
rSP9_X
REAL
16.1
Input Const
rSP8_Y
REAL
5.25
Input Const
rSP8_X
REAL
12.2
Input Const
rSP7_Y
REAL
4.65
Input Const
rSP7_X
REAL
8.3
Input Const
rSP6_Y
REAL
4.2
Input Const
rSP6_X
REAL
4.4
Input Const
rSP5_Y
REAL
3.7
Input Const
rSP5_X
REAL
0.5
Input Const
rSP4_Y
REAL
3.35
Input Const
rSP4_X
REAL
-3.3
Input Const
rSP3_Y
REAL
3.1
Input Const
rSP3_X
REAL
-7.2
Input Const
rSP2_Y
REAL
2.95
Input Const
rSP2_X
REAL
-11.1
Input Const
rSP1_Y
REAL
2.8
Input Const
rSP1_X
REAL
-15.0
Input Const
rCOP_Max
REAL
10.0
Input Const
rCOP_Min
REAL
1.0
Input Const
rCOP_Subst
REAL
3.5
Input Const
tTimeTestIntervall
TIME
TIME#30m0s0ms
Input Const
rEnergyPriceHeatpump
REAL
0.45
Input Const
rEnergyPriceGasboiler
REAL
0.2
Input Const
rEfficiencyHeatpump
REAL
0.9
Input Const
rEfficiencyGasboiler
REAL
0.9
Methods:
mCalculateCurveSectionValue_Real_Real
mCalculateCurveValue_Real_Real
Structure:
mCalculateCurveSectionValue_Real_Real (Method)
mCalculateCurveValue_Real_Real (Method)
Last updated

