Heating and cooling system optimizing heatpump consumption from solar photovoltaic
This page will show some information about how to manage heat pump to consume most energy from photovoltaic, reducing the electricity bill.
First, a smart building should not have "smart thermostats", because they usually are not so smart as a domotic controller. It's preferred to have a temperature (and humidity) sensor in some rooms and modify the outlet water temperature to get the best comfort and power consumption.
Controlling a building with radiating system, heat pump and photovoltaic on the roof is not simple, because several items must be kept into account:
- outdoor min and max temperature
- room temperatures (called diff, difference from setpoint and room temperature)
- variation of diff with the time (derivative of diff on time)
- current power from grid (if negative, some extra power is available from solar photovoltaic)
- and finally, maybe you want to reduce power consumption during the peak hours (usually 9-10 in the morning, and 18-21 in the evening) to contribute to the electricity grid stability!
The goal is to get a comfortable temperature in all rooms, maybe reducing the temperature when rooms are not used, and overheat the building, during winter, when extra power from photovoltaic is available: if setpoint is 21°C but there is extra power, setpoint can be dinamically raised to 21.5 or 22°C for example.
Controlling the EMMETI EH1018DC heat pump by ModBus and LUA script
The heat pump has one input to select half power or full power: it's mainly used during the night to reduce noise, limiting the compressor and fan frequency to 50% or so (the compressor frequency/power can be selected from 0 to 100%).
Water temperature is a good solution to maximize the house comfort, while compressor frequency is perfect to control the usage power.
By default the heat pump has an algorithm to compute the outlet water temperature based on current outdoor temperature, and regulate the compressor frequency (power) proportionally to the difference between the computed temperature and current water temperature.
The idea is to implement a better control of the outlet water temperature based on:
- difference between room setpoint and current temperature diffTemp
- derivative of diffTemp (it's important to know if the difference between setpoin and temperature is decreasing or increasing!)
- minimum (maximum in the Summer) outdoor temperature
- current power from the photovoltaic system (to improve own consumption)
- peak power of the electrical grid, to reduce power consumption in the peak hours (in the early morning and late afternoon): this is used only to help the electrical network to avoid peak power and high energy prices.
The control algorithm is implemented, in a LUA script that computes the right value of outlet water temperature and compressor frequency (power), using the command mbpoll to set the parameters to the heat pump control by Modbus (RS485).
Heatpump RS485 is connected to the domotic controller (RaspberryPI in this case) by a RS485/USB adapter; also the DomBus31 module is used to control heat pump inputs (thermostat on/off, coil/radiant temperature, heating/cooling and full power/half power.
Actually, heat pump is always configured in "night mode", and lua script controls both
- outled fluid temperature needed to have the right comfort in the house
- compressor power percentage, to regulate power
During the night, both fluid temperature and power are reduced to limit power consumption and fan/compressor noise.
During the day both fluid temperature and power are increased, with the exception of the peak hours 9-10 and 18-21 where it's a good practice to reduce consumptions for a better electricity grid stability.
If there is an extra production from photovoltaic (energy exported to the grid), fluid temperature and power are increased to consume all available energy from photovoltaic. Also, room setpoints are automatically increased in case of extra power from photovoltaic, to reduce the power consumed in the evening or in the night.
The files script_time_heatpump_emmeti.lua and config_heatpump_emmeti.lua are available in the Github https://github.com/CreasolTech/domoticz_lua_scripts
The following picture shows how the heat pump work in February, in the North of Italy when controlled by the lua script, that is able to configure the heat pump to track the production of the solar, switch OFF heat pump if rooms are in temperature and there is not enough power from photovoltaic (see on Monday noon), and start the heat pump at minimum, in the night, if the room temperature is decreasing (even if room temperature is above the set point: radiant systems are very slow and temperature should be predicted computing the derivate of diff).
More info at https://www.creasol.it/heatpump