Documentation for the creation and usage of the heat pump library (hplib)

This documentation covers the database preperation, validation and usage for simulation. If you're only interested in using hplib for simulation purpose, you should have a look into chapter 4. How to simulate.

  1. Definitions
  2. Database preperation
  3. Work with database
    1. Load database
    2. Load specific model
    3. Load generic model
  4. How to simulate
    1. Simulate on time step
    2. Simulate a time series
  5. Example heat pump
  6. Validation
    1. Air/Water | on/off
    2. Brine/Water | on/off
    3. Water/Water | on/off
    4. Air/Water | regulated
      1. Heating
      2. Cooling
    5. Brine/Water | regulated
  7. Conclusion

1. Definitions

Abbreviations

Abbreviation Meaning
P_th Thermal output power in W
P_el Electical input Power in W
COP Coefficient of performance
EER Energy Efficiency Ratio
T_in Input temperature in °C at primary side of the heat pump
T_out Output temperature in °C at secondary side of the heat pump
T_amb Ambient temperature in °C
P_th_h_ref Thermal heating output power in W at T_in = -7 °C and T_out = 52 °C
P_el_h_ref Elecrical input power (heating) in W at T_in = -7 °C and T_out = 52 °C
COP_ref Coefficient of performance at T_in = -7 °C and T_out = 52 °C
P_th_c_ref Thermal cooling output power in W at T_in = 35 °C and T_out = 7 °C
P_el_c_ref Elecrical input power (cooling) in W at T_in = 35 °C and T_out = 7 °C
p1-p4 Fit-Parameters for Fit-Function

Group IDs

Group ID Type Subtype
1 Outdoor Air / Water Regulated
2 Brine / Water Regulated
3 Water / Water Regulated
4 Outdoor Air / Water On-Off
5 Brine / Water On-Off
6 Water / Water On-Off

2. Database preparation

This section is only for documentation regarding the development of the final database. It's not neccesary to run this code again.

  1. we downloaded all manufacturer data from https://keymark.eu/en/products/heatpumps/certified-products .
  2. then we unzipped the files to the input folder and used the bash-skript pdf2txt.sh to convert pdf into txt.
  3. afterwards we used the following functions to create and extent the heatpump keymark database.

Process heating database

Process cooling database

Overall there are not so many unique Keymark heat pumps for cooling (34 models) in comparison to heating (505 models).

Out of the 34 models only 4 heat pumps had set points at different outflow temperature. With our fit method it is not possible to fit only over one outflow temperature. For that reason we added another set point at 18°C output temperature based on the heat pumps we had with this condition in Keymark. For that purpose, we identified multiplication factors for eletrical power and eer between 7°C and 18°C secondary output temperature. The mean value of that are used to calculate the electrical power and EER at 18°C for other heat pumps:

P_el at 18°C = P_el at 7°C * multiplication factor 
EER at 18°C = EER at 7°C * multiplication factor
Outside Tempertature Multiplication factor for P_el Multiplication factor for EER
35 0.85 1.21
30 0.82 1.21
25 0.77 1.20
20 0.63 0.95

Create generic heat pump models

Hint: The csv files in the output folder are for documentation and validation purpose. The code hplib.py and database hplib_database files, which are meant to be used for simulations, are located in the src folder.

3. Work with database

3.1 Load database

Simply execute the command without arguments and you will get a DataFrame with the complete list of manufacturers and models. Now you are able to view, filter or sort the database.

3.2 Load specific model

To get the parameters of a specific heat pump model, use the get_parameters() method with a specific Model name from the database. You will get a DataFrame with all parameters including the mean absolute percentage errors (MAPE) for this model.

3.3 Load generic model

To get the parameters of a generic heat pump model, use the get_parameters() method with the following keyword arguments of a free choosen set point

You will get a DataFrame with all parameters for this generic model. For every group id the parameter set is based on the average parameters of all heat pumps of its group with an MAPE of less than 25%.

4. How to simulate

With the Fit-Parameters p1-p4 for P_th, P_el and COP it is possible to calculate the results with the following methods:

  1. P_th and P_el with Fit-Functions and COP = P_th / P_el or
  2. P_th and COP with Fit-Functions and P_el = P_th / COP or
  3. P_el and COP with Fut-Functions and P_th = P_el * COP

While the model by Schwarmberger [1] uses the first method, our validation showed, that the third method leads to better results. Therefore we decided to implement this in the simulate definition.

4.1 Simulate one timestep

Please define a primary input temperature (t_in_primary), secondary input temperature (t_in_secondary), ambient / outdoor temperature (t_amb) in °C and the parameters from the previous step. The t_in_secondary is supposed to be heated up by 5 K which then results in output temperature.

Important:

4.2 Simulate a timeseries

The simulation approach could be to do a for loop around the method of simulating one timestep. But it will be faster to use the previous method with arrays as inputs. For usage you are allowed to define pandas.Series or arrays as input values. It is also possible to combine single values and pandas.Series / arrays.

The next example uses a measured timeseries for ambient / outdoor temperature and secondary input temperature of a real heating system to demonstrate the simulation approach. The data represents on year and has a temporal resolution of 1 minute

5. Example heat pump

To get a overview over the different operation conditions, this section plots the electrical and thermal power as well as the COP for all possible primary and secondary input temperatures

HEATING: Schematic plot of COP, P_el and P_th for an generic air/water heat pump: subtype = on/off

COOLING: Schematic plot of EER, P_el and P_th for an generic air/water heat pump: subtype = regulated

6. Validation

The following plots will give you a detailed view on the differences between simulation and measurement from heat pump keymark. Therefore, all set points for all heat pumps are loaded from the file database_heating_average_normalized_subtypes_validation.csv.

6.1 Air/Water | on/off

6.2 Brine/Water | on/off

6.3 Water/Water | on/off

6.4 Air/Water | regulated

Heating

Cooling

Because of different control strategies, the deviation over different heat pump models is much higher compared to on/off types.

6.4.1 Heating

6.4.2 Cooling

6.5 Brine/Water | regulated

7. Conclusion