3
$\begingroup$

I built my own thermostat that controls the boiler heater for the radiant floor heating in my house and I would like to develop / implement a smarter temperature control algorithm. What I am specifically interested in is the ability to predict when to turn on the heating so that a certain temperature is achieved according to a schedule.

Suppose I want the temperature at 7 am to be 22 degrees Celsius. During the night I want it to be at 18C. Currently, I set the schedule up so that the heating is started at 6 am but depending on how cold it is during the night, an hour may be too little and the temperature does not rise to 22C or it may be to much and the temperature overshoots. I would like an algorithm that would automatically calculate the appropriate time at which to start heating.

I keep searching online and most results are for industrial uses and/or for heating systems that can be modulated such as electrical heaters. The heating system in my house consists of a boiler that heats the water in the floor tubing and I cannot modulate the output, I can only tell it to start or to stop via a mechanical relay that opens or closes a solenoid valve. This, I believe, renders a PID algorithm inappropriate. Fuzzy logic and just PI control may be suitable but can they be made to work with varying set points?

Supervised machine learning is overkill for my needs and I don't want to spend weeks to train it.

What other options would I have?

$\endgroup$
11
  • $\begingroup$ I'm not quite sure this is on-topic here. $\endgroup$ Jan 10, 2019 at 12:33
  • $\begingroup$ I'm not either, but this question on stack exchange would seem to suggest it is. $\endgroup$ Jan 10, 2019 at 12:38
  • 3
    $\begingroup$ This is not really about an algorithm. It's about modeling the physical environment, with or without using data science. $\endgroup$ Jan 10, 2019 at 12:44
  • $\begingroup$ I agree, but if Honeywell designs a new thermostat, I doubt they will send a team of engineers to every customer's home so that they can model their physical environment. $\endgroup$ Jan 10, 2019 at 12:50
  • $\begingroup$ You can always "fake" a continuous input by controlling the duty cycle -- pick a time period (e.g. 1 minute), then if you want to supply "25% power", you turn it on for 15s, then off for 45s, etc. The shorter the period you pick, the less overshoot there will be, but extremely short periods might not be suitable for other reasons. $\endgroup$ Jan 10, 2019 at 12:52

4 Answers 4

0
$\begingroup$

I too am working on something similar for a new house I'm building. In my system the boiler is controlled by an Opentherm interface I'm designing. This interface connects to fhem via software I'll also write. I chose fhem because it supports a wide range of kit, although perl probably wouldn't be my first choice of language. My radiators will have MAX eq-3 thermostat heads (as they were best bang-per-buck). Again fhem supports these and they can be talked to by low power radio cube which hangs off ethernet.

My radiator heads measure the room temperature and adjust the valve accordingly. They report back when they change so my idea is to use that to estimate the house demand and then use that to control the boiler. For example, say my lounge radiator is saying it is at 50% and I know it is a 1kW radiator, then I have 500W of demand. Say my boiler is 5kW then I need to set the duty cycle of that to 10%. Problems I see are that the valve is unlikely to linear so I'll need to derive some look up table to make it nearer linear. Radiator output will also depend on water temperature but I'll know that from Opentherm so I can adjust for that as I have a formula for that.

But coming back to OP's question I believe that smart thermostats learn how fast the temperature rises in a house. So if the house heats up at 2C/hr and you have set 20C at 8am then if house is 18C the heating will start at 6am. It might also be that the heating is backed off a bit during the warm up phase if it looks to be warming up faster than expected (which would be D of PID). And perhaps this degC/hr figure is always being adjusted so that it changes from autumn to winter to spring.

I think, from reading the CM67 datasheet, that smart stats have a proportional zone (1.5C typical on CM67). Outside of that heating is either all on or all off. Inside the range the duty cycle is controlled, 3-12 cycles per hour. That would P of PID. There might be I too. All of that just controls the duty cycle, for gas, every 10 minutes you get a burn of x minutes.

BTW Typically houses have a long time constant due to all the brick and concrete in them. That's why heating 16/24 is ~95% of the loss of heating 24/24. You can estimate that figure by knowing inside and outside temperatures. I did a thought experiment on this which I blogged here. Interestingly the better the house is insulated the less difference there is to heating 24/24. A controversial statement I know but maths don't lie.

Given you are heating the floor, a large mass, I would expect you'll have quite a time constant. I think you'll need to learn (somehow) what that is and use that to predict temperature rise if you are not to overshoot.

$\endgroup$
1
  • $\begingroup$ This is what I ended up doing. Whenever I turn on the heating in a room, I keep track of how fast the temperature rises. Since I am not measuring outside temperature, I keep a running average of the last 5 days. I then use this value to determine when I should turn on the heating in order to achieve a certain temperature at a certain time. If it heats up too fast or too slow, the running average. It's only off by about half an hour when outside temp differences are large from one day to another. For some reason, I did not get a notification for your answer until Ben DeMott posted yesterday. $\endgroup$ Jan 27, 2022 at 9:05
1
$\begingroup$

Maybe approach it from a "BTU's needed over time" standpoint. I don't know the exact maths off the top of my head, but consider:

  • What is the temperature differential?
  • What is the heating capacity (BTU's) of the radiant flooring system?
  • How long does it take to start rendering 68% of that heat to the room?
  • What is the heating load of the room in BTU's?
  • How efficient is the heat generated?

Then do some math on these numbers. Something like...

$t_{hours}=\dfrac{(T_{end}-T_{start})\cdot H_{demand}}{H_{supply}}\cdot \mathrm{eff}^{-1} + t_{delay}$

So for an end temperature of 22°C and a start of 18°C, heat of 50kBTU, demand of 20kBTU, 90% efficiency, and 15 minutee delay:

$\begin{align*}t_{hours} &= \dfrac{(22°C-18°C)\cdot 20k_{demand}}{50k_{heat}}\cdot 0.90_{\mathrm{eff}}^{-1} + 0.25h_{delay}\\ &= \dfrac{80\mathrm{k}}{50\mathrm{k}}\cdot 1.\bar{1}+ 0.25\mathrm{h}\\ &= 2.02\bar{7}\mathrm{h} \end{align*} $

Some analysis and experimentation will be needed to arrive at realistic values but hopefully this is a start.

$\endgroup$
2
  • $\begingroup$ Thanks for the MathJax fix. Wish it was standard across Stacks. :) $\endgroup$
    – rdtsc
    Jan 19, 2019 at 21:24
  • $\begingroup$ This is definitely a start. My question would then be how can I obtain these values programatically because the heating load depends on how efficient the room is thermally isolated and on the outside temperature. The supply also changes according to the size of the room, and therefore the size of the radiant surface. How would I be able to automatically calibrate these values? $\endgroup$ Jan 20, 2019 at 10:42
0
$\begingroup$

I'm working on something similar. I have wall heating through the whole house and I am building an openTherm that can also measure outside temperature. the inside temperature will be provided by my home automation system.

OpenTherm can be used to set the temperature of the water coming from the heater. Through some experimentation I found that (for example) when the outside temperature is 3 degrees Celsius and I want 18 degrees Celsius inside I need to set the water temperature to 40 degrees Celcius (for my particular heating system layout)

I plan to take extend that idea to the following approach:

Create a lookup table with the difference between inside and outside temperature as key and the following values: - required temperature of water from boiler - time it takes to heat up by one degree when the boiler water temperature to the temperature for the next higher entry. For example how long does it take to increase the temperatur from 18 to 19 degrees when I increase the water temperature from 40 to 41.3 - time it takes cool off by one degree when the heat is turned of

This allows me to calculate how long it (should) take for temperature increase to take effect, given how much I increase the heating water temperature. Or inversely I could calculate the heating water temperature required to achieve the desired increase in a given amount of time.

I will populate the table with some ibnitial reasonable values and than use my home automation system to measure the actual system response and use that to fine tune the table.

Required capacity and speed will also depend on: - the amount ventilation (in my case this is also variable) - which spaces are being heated (in my case spaces are only heated when in use, and or depending on an individual program)

Hope this gives you some ideas

$\endgroup$
0
$\begingroup$

I believe NEST and other thermostats use a Kalman filter / PID algorithm or a modification there of.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.