Compute the thermal characteristics of your house

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
Post Reply
User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Compute the thermal characteristics of your house

Post by Antori91 » Thursday 21 June 2018 15:01

Hello,

By using two temperature sensors (indoor and outdoor) and an energy usage sensor, you can calculate with Domoticz the thermal mass (C), the thermal loss (H) and the cooling / heating rate (k) of your House. Such project is embedded in my home automation project http://www.domoticz.com/forum/viewtopic ... 38&t=17032.

Once you have calculated such constants, you can answer questions like:
- 1 / If I stop heating now, how many hours / days before the indoor temperature reaches the outside temperature?
- 2 / If I start heating now, how many hours / days before the indoor temperature reaches the setpoint?
- 3 / How much energy I will use to heat my house the next hour?
- 4 / Is it true I always make money when I stop heating, even for a short period of time?
- ...

Thermal modeling of buildings is not really easy to understand (at least for me). There is a whitepaper here: http://www.mdpi.com/1996-1073/10/9/1358 . You do not need to read the entire whitepaper, but focus on chapters 3 and 4 which provide the theoretical context.

Using Domoticz, the H calculation is really simple, I use a virtual sensor and divide the total energy used during a day by the number of Degrees.Day of the day. This must be done when heating is on with a constant indoor temperature (i.e. steady phase with an indoor temperature equal to the setpoint).

I found k a little bit more complicated to calculate. I use also virtual sensor and moving average (4 hours with temperature readings every 5 minutes) to smooth out the ratio (indoor temp - indoor temp 5 mn ago) / (indoor temp 5 mn ago - outside temp 5 mn ago) variations. This should be measured when the heating is off and the indoor temperature decreasing (i.e. the outdoor temperature is below the indoor temperature).

Then, C (thermal mass) is also easy to calculate (H / k).

Now, you can answer to the questions (Tout is outdoor temp, Tsp is setpoint, To is your initial indoor temp and P the Power of your Heating Appliance) :
Question 1 : 1/k days,
Question 2 : ∆t in days = ( C * (Tsp - To ) ) / ( P - H * ( (To+Tsp)/2 - Tout ) )
Question 3 : assuming your indoor temp is at the setpoint (steady phase), E(W.h) is H * (Tsp - Tout)

This is more for now an on-going project. My end goal is to build a heating optimizer for my house not only based on schedule (like it is today) but enough smart to use such constants and be more aggressive in the optimization process.

Any comment/help is welcome
k.JPG
k.JPG (93.78 KiB) Viewed 1027 times
Attachments
k.JPG
k.JPG (93.78 KiB) Viewed 1031 times
k.JPG
k.JPG (93.78 KiB) Viewed 1032 times
Last edited by Antori91 on Saturday 30 June 2018 8:27, edited 11 times in total.
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Compute the thermal characteristics of your house

Post by Antori91 » Thursday 21 June 2018 15:33

Theory and calculations:
Theorie.JPG
Theorie.JPG (147.83 KiB) Viewed 1189 times
H_ThermalLoss.JPG
H_ThermalLoss.JPG (89.65 KiB) Viewed 1040 times
Attachments
Indoor_Outdoor_Temp.JPG
Indoor_Outdoor_Temp.JPG (58.7 KiB) Viewed 1040 times
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

kimhav
Posts: 106
Joined: Tuesday 01 October 2013 8:31
Target OS: Raspberry Pi
Domoticz version: 4.10053
Location: Malmo, Sweden
Contact:

Re: Compute the thermal characteristics of your house

Post by kimhav » Friday 17 August 2018 9:53

Nice project! Going to totally look into this over the next couple of weeks.
Member of Domoticz Sweden Telegram Group

jake
Posts: 483
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: Compute the thermal characteristics of your house

Post by jake » Sunday 14 October 2018 22:58

Do you assume that all heat in the house is generated by a measurable energy source? In my case, with a very large window on south-west orientation, we benefit a lot of the sunshine in early spring and fall. Therefore a calculation will quite often not be fair. On other days the temperature in the living room will increase by using the oven to do some baking, while the actual heating of the house takes place by natural gas (and wood stove, to complicate matters ;) )

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Compute the thermal characteristics of your house

Post by Antori91 » Monday 15 October 2018 10:09

jake wrote:
Sunday 14 October 2018 22:58
Do you assume that all heat in the house is generated by a measurable energy source? In my case, with a very large window on south-west orientation, we benefit a lot of the sunshine in early spring and fall. Therefore a calculation will quite often not be fair. On other days the temperature in the living room will increase by using the oven to do some baking, while the actual heating of the house takes place by natural gas (and wood stove, to complicate matters ;) )
My house has also large windows on south-west orientation and benefit too from sunshine. So yes, using data from a Solar Radiation sensor in the heating optimizer would be nice. Currently, I have more modest goals : compute/validate my house thermal parameters and understand how my house works from a thermal perspective. The thermal loss, cooling rate and thermal mass are computed all day long, so the averages given by Domoticz are quite accurate (transient phenomenons as sunshine smoothed). For example, you can see on a graph above that the average heat loss of my house is about 6 kWh per day and degree of heating (heating period from December 2017 to April 2018). This is also the value that I obtained by a theoretical calculation based on the materials used to build my house and the thickness of these materials.
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

jake
Posts: 483
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi
Domoticz version: beta
Contact:

Re: Compute the thermal characteristics of your house

Post by jake » Monday 15 October 2018 13:25

Very interesting! Since last winter I use the Python software virtual thermostat SVT from the forum. There where the physical iSense thermostat gives quite long temperature dips, the SVT gives a nice temperature slope towards setpoint and stays there. It also calculates with a self learning heat loss.
Are you able to share your code?

User avatar
sincze
Posts: 988
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Netherlands
Contact:

Re: Compute the thermal characteristics of your house

Post by sincze » Monday 15 October 2018 14:05

Interesting indeed. Seems i Have a new project. Tnx.
Using Pass2php since 2016-12
LAN: RFLink, P1-Port, OTGW, MySensors
USB: RFXCom, ZWave
WIFI: Mi-light Wifi-Bridge, Sonoff, ESP8266, Xiaomi Gateway
Solar: Omnik Inverter, PVOutput
Video: Kodi clients with Harmony HUB
Sensors: You name it I probably got 1.

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Compute the thermal characteristics of your house

Post by Antori91 » Monday 15 October 2018 18:04

jake wrote:
Monday 15 October 2018 13:25
Very interesting! Since last winter I use the Python software virtual thermostat SVT from the forum. There where the physical iSense thermostat gives quite long temperature dips, the SVT gives a nice temperature slope towards setpoint and stays there. It also calculates with a self learning heat loss.
Are you able to share your code?
All the code I've written and currently using is shared (cf. github url below). But I'm not sure that it is easily reusable because :
- It is very dedicated to my environment,
- coded using Node.js and not Domoticz dzVents/Lua standard (and even less plugin oriented).

Anyway, if you want to take a look, the module which computes the thermal ratios is https://github.com/Antori91/Home_Automa ... _ACS712.js
The corresponding lines are between 180 and 230.
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

Logread
Posts: 201
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Compute the thermal characteristics of your house

Post by Logread » Monday 15 October 2018 19:31

@Antori91,
Are you the same Antor who developped the Smart Virtual Thermostat plugin for Vera quite a few years ago ?

If indeed it is you, the SVT plugin that @jake refers to is a port to domoticz of your original Vera plugin that I wrote when I switched from Vera to domoticz. May be there is an opportunity to further enhance its logic if you made progress since then ? Code is at https://github.com/999LV/SmartVirtualThermostat

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Compute the thermal characteristics of your house

Post by Antori91 » Tuesday 16 October 2018 8:34

Logread wrote:
Monday 15 October 2018 19:31
@Antori91,
Are you the same Antor who developped the Smart Virtual Thermostat plugin for Vera quite a few years ago ?
Hello,
No, I'm not this Antor Guy.
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests