Comparison and Implementation of MPC and Simple Predictive Control Into A Heat Pump System
Comparison and Implementation of MPC and Simple Predictive Control Into A Heat Pump System
Abstract. Heat pumps in combination with thermal energy storage systems offer the potential to
response to fluctuating renewable energy sources, e.g. photovoltaics. To fully exploit this
flexibility and financial potential, predictive control strategies are needed. Since an additional
effort due to detailed knowledge and programming skills is required to create the model
predictive control (MPC) strategies, a fast and easy implementation is prevented. Therefore, a
second model-based approach is developed with a predictive but rule-based control. This
simplified approach uses predictive models as well but energy balancing to determine the heat
pump operation and the state of charge of thermal storage units throughout the day. In this paper,
two predictive approaches were compared with two rule-based controls and evaluated for their
potential for PV self-consumption and cost savings in annual simulations. In addition, one rule-
based PV optimized control (PVC) and the predictive approaches, MPC and the simple predictive
control (SPC), are implemented in the real operation in a plus energy building. In simulation, the
best result is achieved by the MPC with a cost saving of 8.3 % due to a high PV energy
consumption but mainly to the best efficiency with a SPF of 4.5. Despite the predictive approach
of SPC, SPC and PVC achieve very similar results with cost savings of 2.5 % and 0.8 %. Since the
costs of PV include taxes, these moderate cost savings are achieved. Excluding these taxes, there
are significantly higher cost savings of up to 34 % for MPC. In real operation, differences between
simulation results and measured data become apparent. This gap between the set point output
of the simulation and the set point input of the real components poses a challenge to the
implementation of efficient and cost-effective control like the MPC.
Copyright ©2022 by the authors. This conference paper is published under a CC-BY-4.0 license. 1 of 8
cost savings of a maximum of 24 % for a single-family the state of charge of thermal storage units
house in Luxembourg when variable electricity throughout the day.
prices based on the electricity market are applied. In
some cases, field tests of model predictive control
strategies are realized in residential and office
2. Research Methods
buildings. De Coninck et al. [5] implemented a MPC To determine and compare the potential and
control with non-linear models in an office building differences of the two predictive control approaches,
and showed that the MPC provides a similar or better they are first compared in an annual simulation. In a
thermal comfort than the reference control while second step, the real operation of the MPC and SPC
reducing the energy costs by more than 30 %. will be implemented in the energy system of the
terraced houses and tested over several weeks.
In contrast to the complex modelling and
programming of an MPC, advanced system control In the annual simulation, the results of the control
strategies with a predictive approach can reduce the approaches (set points) are entered into the energy
programming effort and still achieve good results. system model. The forecast horizon is 48 h in a 15
Few works on simple predictive controls in the minute time step, whereby only the first 24 hours are
building sector are provided in the literature. transferred to the system model as setpoints. This
Rolando and Madani [6] present a control algorithm results in 366 simulation runs in year 2020. In
developed in a Swedish research project that shows addition, the two control approaches were compared
annual energy savings of 10 % by predicting solar with two rule-based control approaches to evaluate
energy gains in single-family homes. the predictive approaches. The rule-based
approaches include a heat-guided (HC) and a PV-
The mentioned research works on advanced system optimized (PVC) control. The process of the annual
control strategies with a predictive approach show a simulation is shown in Fig. 2.
similar potential of cost saving to MPC. Therefore, in
the following work, an MPC and a simple predictive For offering an overview of the potential of the
control approach will be compared in simulation and different control strategies monitoring data from the
in a real energy system of terraced houses in terraced houses for a period of 12 months from
Germany. The real heat pump system, which supplies January 2020 until December 2020 is chosen. The
eight terraced houses, is to be operated in such a way measured PV power as well as measured thermal and
that it optimally uses the PV power of the shared PV electrical load are used as ideal prediction for the
system. The heat pump system consists of two MPC and SPC. For the simulation of the energy
central modulating heat pumps (MWPs) and eight system, controlled by the outputs of HC, PVC, SPC and
decentral on/off heat pumps (boosters) for MPC, the measured data serve as actual PV
providing domestic hot water (DHW). In addition, production and loads. The operation and comparison
the energy system of the terraced houses consists of are implemented in MATLAB [7]. Boundary and start
a shared PV and battery system. conditions are the same in the four cases.
8x System MATLAB
DHW-
Booster Actual values Prediction values
2000 liter
800 liter
MHP 1
AB A
valve
Control strategy
7x
Boreholes
a 100 m
Actual values
24 hours
Set points
2 of 8
2.1 System model 2.2 Prediction models
For the use of predictive controls, MPC and SPC,
In general, the system models base on energy flows
forecasting models are used to generate the thermal
coupled in an energy node. The model of the thermal
and electrical load forecast.
storage is an energy node of incoming and outgoing
thermal power with constant thermal losses and
Artificial neural networks (ANN) in Python with the
presented in equation (1). The MHPs are represented
library Tensorflow (Apache, 2019) determine the
by a polynomial for B5 °C/W35 °C with a variable
prediction of thermal building load and household
modulation speed.
electricity. Both ANN are recurrent, trained with
measured data of 15 months from the energy
2 monitoring of the terraced houses and deliver
(1) prediction data for 24 hours in a 15 minutes
∑ Q̇ 𝑀𝐻𝑃,𝑛 (𝑡) + Q̇ 𝑐𝑎𝑝 (𝑡) = Q̇ 𝑙𝑜𝑠𝑠 (𝑡) + Q̇ 𝑡ℎ (𝑡)
timestep. Inputs are date information (month, day,
𝑛=1
hour), ambient temperature and horizontal global
Depending on the operation plan (set points) of the solar radiation. In addition, the ANN of the household
control strategy, the MHPs adapt their thermal electricity has inputs of historic values of one day and
power either to the thermal building load or to the one week ago. During a long-time operation of the
available PV power. Equation (2) shows thermal MPC in April 2020, the ANN of thermal building load
adaption where 𝑄𝑀𝐻𝑃 the thermal power of one MHP receive values of RMSE of 3.7 kW and NRMSE of
is. Equation (3) shows electrical power, where 𝑃𝑀𝐻𝑃 19 %, the household electricity values of RMSE of
the electrical power of one MHP is. 1.6 kW and NRMSE of 14 %.
2.3 MPC
4 3
𝑃𝑀𝐻𝑃 = 𝑝1 ∗ Q̇ 𝑀𝐻𝑃 + 𝑝2 ∗ Q̇ 𝑀𝐻𝑃 …
(2) In this paper, the MPC approach is realized by a
2 mixed-integer linear programming (MILP). As the
+ 𝑝3 ∗ Q̇ 𝑀𝐻𝑃 + 𝑝4 ∗ Q̇ 𝑀𝐻𝑃 + 𝑝5 system model, all energy models base on energy
flows coupled in an energy node in order to receive
linear models (see equation (1)). The characteristics
of the MHPs differ, as they are represented by fixed
operation points at B5 °C/W35 °C between which the
𝑄𝑀𝐻𝑃 = 𝑞1 ∗ 𝑃𝑀𝐻𝑃 6 + 𝑞2 ∗ 𝑃𝑀𝐻𝑃 5 … MILP can interpolate. The interpolation is enabled by
the additional software GUROBI [10], for using the
(3)
+ 𝑞3 ∗ 𝑃𝑀𝐻𝑃 4 + 𝑞4 ∗ 𝑃𝑀𝐻𝑃 3 … Special Ordered Set (SOS) option and is integrated in
MATLAB.
+ 𝑞5 ∗ 𝑃𝑀𝐻𝑃 2 + 𝑞6 ∗ 𝑃𝑀𝐻𝑃 + 𝑞7
The cost function (J) bases on operating costs (c) for
The model of the DHW storage is an energy node of the consumed electricity, including household
incoming and outgoing thermal power with a electricity, the MHPs and the DHW-HPs depending
constant thermal loss. Each boosters is represented on the consumption of grid (𝐸𝑒𝑙,𝑔𝑟𝑖𝑑 ), PV (𝐸𝑒𝑙,𝑃𝑉 ) or
by one operation point at 25 °C/55 °C with a thermal battery (𝐸𝑒𝑙,𝐵𝑎𝑡 ) as well as a bonus for grid feed-in
power of 3 kW and COP of 4.3. ( 𝐸𝑒𝑙,feedin ). The PV costs include costs for insurance
(0.0243 €/kWh) and national taxes for renewable
As well, the battery model is an energy balance of energies (0.064 €/kWh). Battery costs consists of PV
incoming and outgoing electrical power with costs and losses of 20 %. In this context, the battery
inverter efficiency and calculated by equation (4). price results from PV price multiplied by a factor of
The battery is not controlled and serves a passive 1.2. The energy prices are shown in Tab. 1.
component that is charged and discharged by the
electrical energy balance of PV power (𝑃𝑃𝑉 ), Tab. 1 - Electricity prices.
electrical consumption of MHPs (𝑃𝑀𝐻𝑃 ) and boosters
(𝑃𝑏 ). Energy prices Price
Grid electricity 0.34 €/kWh
𝑃𝑃𝑉 (𝑡) ∗ 𝑛𝑙𝑜𝑠𝑠 + 𝐶𝑏𝑎𝑡,𝑐𝑎𝑝 = ⋯ PV electricity 0.0883 €/kWh
2 8
(4)
∑ 𝑃𝑀𝐻𝑃,𝑛 (𝑡) + ∑ 𝑃𝑏,𝑛 (𝑡) Battery electricity 0.0883 €/kWh *1.2
𝑛=1 𝑛=1 PV feed-in electricity 0.11 €/kWh
The validation of models with energy balancing
showed moderate but sufficient accuracy in the real
The results of this MPC approach provides an SOC
energy system [8] and in a hardware-in-the-loop test
determining the set value for the MHPs. The SOC is
bench [9].
divided into 8 areas, respectively allocated to a set
value of 32 °C to 46 °C in a 2 K step. The boosters
3 of 8
receive the set temperature of the storage tank as set adaption to the thermal building load (equation (2))
value when they are to be on (60 ° C) or off (45 ° C). and the boosters to charge the minimal storage
The minimum value of 45 °C ensures the comfort capacity.
limits of the habitants. A detailed description of the
MILP MPC can be found in [11]. 2.6 Simulation
For the comparison of the control strategies,
2.4 SPC measured data of the energy system of the terraced
houses is used. The process of the annual simulation
The SPC is based on a modification of the electrical
is shown in Fig. 2. The energy consumption and
operation of the MHPs, which results from the
production for the period of 12 months are shown in
thermal building load forecast. As balancing of the
Tab. 2.
loads is performed on electrical loads the thermal
building load forecast is converted into an electrical
The results of the simulation for the 12 months
load with a constant COP, which should reflect the
period show low differences for the energy shares,
operation of the heat pumps. Electrical operation
but differences for operating costs. The results of the
loads that occur after PV production are shifted
PV self-consumption and the self-sufficiency of the
forward to times with PV production. The modified
comparison are shown in Fig. 4. In general, the
electrical operation results in set point for the MHPs.
results do not vary significantly between the
Therefore, the electrical operation is converted back
different control strategies. HC shows less PV direct
to a thermal building load using the polynomial in
consumption and highest grid consumption.
equation (2) that reflect the characteristic curve of
the heat pump at B5 °C/W35 °C. The shifting of the
Tab. 2 – Energy consumption in 2020
loads is limited up to the maximum storage level,
which is 46 °C. Without PV production the set point
is 32 °C, while with PV production the set point Energy consumption
results from the shifted loads. Fig. 3 (above) shows Thermal load 36.56 MWh
electrical operation of the MHPs from the thermal
building load forecast, the modified electrical DHW load 26.66 MWh
operation and the PV power forecast. Below in Fig. 3 Electrical load 30.85 MWh
is the set temperature, which results from the
modified electrical operation. The same procedure is PV production 85.88 MWh
repeated for the boosters, but with a constant COP of
4.3.
4 of 8
savings of 13 %, the SPC of 15 % and the MPC of Fig. 6 shows the process of the control strategies.
34 %. These cost savings of the MPC are in a range of When operating the predictive controls, the MPC or
EU-wide simulation studies, such as Salpakari and SPC are started at a certain time T. The MPC starts
Lund [3] and Bechtel et al [4]. Although the every hour, the SPC only once a day at 6 am. The
differences between PVC und SPC are small, created operation plan is passed on to the Set/Check
favourable results are shown for the predictive Loop. The Set/Check sets the set values into the SQL
approach. database and checks the operation of the system for
disturbances and deviations of the operation plan,
and if necessary, sets set values for switch on or off.
This ensures the operation reliability during time
slot of next set values. In this paper this process is
called online simulation.
HC 4.46 4.43
Write set values
PVC 4.23 4.27
Monitoring data
Set values
measurements
MPC 4.51 4.46 every 3 minutes
Set/Check Loop
The simulation study was repeated with the
measurement data from the year 2019 and very
similar results are obtained for the four control SQL Server (Data exchange)
strategies. Regarding the results of years 2019 and
2020 the PVC has an energy consumption from 1.4 %
to 1.7 %, the SPC from 0.2 % to 0.4 % and the MPC Energy management software
from – 0.3 % to – 0.6 %, compared to HC. The
potential of cost saving is for the PVC in a range of
0.2 % - 0.8 %, for the SPC in a range of 2.8 % - 4.6 % PVC
Values
from SQL
and for the MPC in a range of 8.3 % - 9.6 % under PV
costs with taxes for renewable energies.
3. Real-life implementation
Physical energy system
To test the control strategies in real operation, the
MPC and SPC are implemented in the real energy Fig. 6 – Process of control strategies
system of the terraced houses. Since October 2018,
the energy system has been operated with the PVC For the evaluation of the PVC, long operating times
installed in an energy management software which from October 2018 until now are available. However,
controls the heat pumps. In contrast, the MPC and the MPC and SPC were only operated over several
SPC will run on the software MATLAB and the set weeks, so that a direct comparison is not possible
points will be transferred to the energy management due to the short period of time and the different
system via an SQL database and set to the heat boundary conditions (e.g. weather, user behaviour,
pumps from there. etc.). In order to give an impression of the control
5 of 8
strategy, characteristic values from the target model were identified and implemented. The
specification (online simulation) and from measured comparison of online simulation and measured data
values from the real operation of the MPC and SPC is from 22.03.2021 until 03.05.2021 and is shown in
are compared. In addition, the measured results of Tab. 5. Although the values of the PV self-
the PVC are presented over the period from year consumption and the PV self-sufficiency are very
2019 as no additional control strategy was tested in similar, the operating costs show a clear difference.
this year. However, since about 27 % more PV was produced
in the measurement than in the PV forecast of the
3.1 Real operation of PVC online simulation, there is a higher feed-in in
absolute values. The same is shown in the energy
The standard operation in the energy system of the consumption, but the relative (13 %) and absolute
terraced houses is PVC. In order to not only obtain an grid consumption is not significantly higher in the
overview of the characteristic values of the PVC in measurement. The low operating costs of the
real operation for the year 2019, the offline measurement arise mainly from the significantly
simulation results of the PVC for the year 2019 from higher profit from the PV feed-in tariff. The SPF is
the upper chapter are also presented. In the significantly worse in the measurement, although
simulation model, however, other boundary there is the same heating and DHW consumption.
conditions are partly applied. The temperature limit This shows that the targeted compressor control
of the thermal storage in the model is 46 °C, in the from the online simulation cannot be implemented in
implemented PVC it is 39 °C in 2019. real operation at the MHPs.
Tab. 4 – Comparison of offline simulation and Tab. 5 – Comparison of online simulation and
measured data of PVC in year 2019 measured data of MPC
6 of 8
The SPF, although slightly lower, is quite well in line. When comparing online and offline simulation and
Due to the low PV production, the MHPs were only measured data, the main differences are in the SPF
occasionally operated in the high temperature range, and consequently in the energy consumption. The
so that the characteristic curve from the simulation differences come from the MHPs characteristic curve
was reproduced well. and additionally for the MPC and SPC by the load
forecasts. The simple MHP characteristic curve in the
Tab. 6 – Comparison of online simulation and simulation does not correctly reflect the SPF in
measured data of SPC operation. Especially the annual comparison of the
PVC shows clear differences between measured data
Simulation Measurement and simulation. Due to the higher storage
temperatures, the characteristic curve in the
PV 1.2 MWh 1.4 MWh simulation should be set at higher temperatures, e.g.:
production B5 °C/W 40 °C or be created with another variable,
Energy 2.9 MWh 3.3 MWh which reflects the storage tank level. In this way, the
consumption results from the measurement could be better
reflected in simulation.
PV self- 70 % / 92 % 56 %/ 84 %
consumption/ Real operation control by SPC was well implemented
incl. Battery and it shows secure operation and full cover of loads.
PV self- 30 % / 40 % 25 %/ 34 %
sufficiency/ Finally, it is shown that not only the full utilization of
incl. Battery the storage in PV phases reduces the operating costs,
but also the efficient operation of the MHPs. This
Operating 679 € 818 € efficient operation is achieved by operating points in
costs the range of 30 % to 40 % of the maximum thermal
SPFMHP 4.6 4.4 power. In PV phases, the thermal storage should be
charged over a longer time period in efficient
operation points. In grid operation, it is more
advantageous to use the thermal storage also as a
4. Discussion buffer to operate the MHPs continuously in efficient
mode instead of adapting to the thermal building
In the simulation, the MPC achieves the best results load. In real operation, targeted compressor control
in energy consumption and cost savings, although it cannot be implemented due to the manufacturer's
does not have the highest PV self-consumption. specifications of these MHPs. This gap between the
These results come from the high SPF resulting from set point output of the simulation and the set point
the better operation strategy of the MPC. Unlike the input of the real components poses a challenge to the
other control strategies, the MPC specifically takes implementation of efficient and cost-effective control
advantage of the better efficiency of the MHP in like the MPC. However, at the same time, the
partial load operation. Not only during PV, but also advantage is that poor control implementation,
during grid consumption, the thermal storage is incorrect load forecasts or unpredictable events can
charged to operate the heat pump at the optimal be compensated by the internal heat pump control.
operating point continuously. Therefore, the lowest
grid consumption results, which is weighted the 5. Conclusion
most by the energy prices.
In this paper, a PV optimized control, an MPC
In contrast, the control of HC, PVC and SPC adapts the approach and a simple predictive control approach
MHPs in case of grid consumption to the thermal load are investigated in simulation and real operation.
and operates them, depending on the load, also in
less efficient operating points. This predictive The annual simulation was performed with
operation with a focus on efficient partial load measured data from 2019 and 2020. Both annual
operation out of PV periods has not been simulations achieve very similar results. In the
implemented in SPC and should therefore be annual simulations, the two predictive approaches
integrated in further work. This could improve the were compared with two rule-based controls and
results compared to the PVC. evaluated for their potential for PV self-consumption
and cost savings. The two rule-based controls are
In real operation, PVC, MPC and SPC were heat controlled (HC) default operation and a PV
implemented in the energy system of the terraced controlled (PVC) operation with temperature rise in
houses. MPC and SPC were implemented in MATLAB case of PV surplus.
and coupled with an SQL interface to the energy
management software. The PVC runs directly in the Compared to the HC in the annual simulation from
energy management software. During the operation 2020, the PV self-consumption can only be increased
phases the controls were shown to be reliable and to to a few absolute percentage points (2 % - 3 %).
cover the thermal loads of the building. Despite the predictive approach of SPC, SPC and PVC
achieve very similar results. The relative cost saving
7 of 8
of the SPC is 2.8 % and thus only slightly better than implementation and evaluation of model
that of the PVC. The best result is achieved by the predictive control for an office building in
MPC with a cost saving of 8.3 %. The energy prices Brussels. Energy & Buildings, Volume 111, Pages
used are those of the year 2019 for the terraced 290-298.
houses and include taxes for PV direct consumption.
Excluding these taxes, there are significantly higher [6] Rolando, D. and Madani H.; A heat pump system
cost savings of up to 34 % for MPC. The good results control based on solar gain prediction. HPT
of the MPC are due to a high PV energy consumption MAGAZINE 3/2020, Vol. 39, 18–21.
but mainly to the best efficiency with a SPF of 4.5.
[7] MathWorks. 2020. MATLAB. Version R2020a
PCV, MPC and SPC were operated in the real energy
system of the terraced houses. During the operation [8] Betzold, C., Dentel, A. and Bordin, S. (2020).
phases, the controls were shown to be reliable and to Entwicklung und Implementierung von Betriebs-
cover the thermal loads of the building. In real führungsstrategien in einem
operation, differences between offline/online Plusenergiegebäude. The 8th Conference of
simulation results and measured data become IBPSA Germany and Austria, Graz, Österreich.
apparent. Since the set point specifications from the
simulation can only be transferred to the real MHPs [9] Hummel, S., Betzold, C., Kandasamy, K., Bordin, S.,
in the form of set point temperatures, the operating and Dentel, A. (2020). Experimentelle
plan cannot be fully implemented. In the case of PVC Validierung von Simulationsmodellen an einem
this is advantageous, since better results have been Hardware-in-the-loop Wärmepumpenprüfstand.
obtained in the measurement than in the The 8th Conference of IBPSA Germany and
offline/online simulation. In the case of MPC and SPC, Austria, Graz, Österreich.
however, worse results are obtained in real
operation. [10] Gurobi Optimization, LLC., 2019, Gurobi Version
8
6. Acknowledgement
[11] Betzold, C., Dentel, A. (2021). Evaluation and test
This paper presents results from the projects "Herzo operation of different model predictive control
Base - Energy storage houses - An energy flexible approaches for an energy system. The 17th
building and energy concept of tomorrow" (FKZ International Conference of IBPSA - Building
03ET1364A) and "Herzo Opt - Monitoring of the Simulation 2021, Bruges, Belgium.
building envelope, thermal room comfort and energy
system with operational optimization" (FKZ
03ET1641A). The project is funded by the German 8. Data access statement
Federal Ministry for Economic Affairs and Energy The datasets generated during and/or analysed
based on a resolution of the German Bundestag. during the current study are not publicly available
because of privacy of the residents but are/will be
7. References available on request with privacy agreement
8 of 8