You’re absolutely right—those are important factors, especially for building heating, where the system is influenced by many external and even subjective variables.
Thinking about it, I have to agree that this kind of approach is probably not suitable for full-scale home heating. There are simply too many influences like ambient conditions, airflow, and comfort perception that are hard to capture with such a simplified method.
It seems much more reasonable to apply something like this only to more contained and predictable systems—like a small oven, a drying chamber, or similar setups where the thermal behavior is easier to observe and repeat.
So thanks for bringing that up—that’s an important point and definitely helps to put the idea into the right context.
The outside temperature , wind and solar gain makes the job more complex .
The level of overshoot is affected by these factors as it not only affects the rate the system approaches the setpoint ( the load on the heating ) and also the effect of stored heat in the system still providing heating after the set point has tripped - that stored heat will alter the degree of overshoot according to the weather . ( hence when it’s cold you need to set the heating set point higher in an on/off system ).
It’s a very complex problem not helped by human perception - it’s cold OUTSIDE ,I’ll turn up the heating , activity in the house ( time of day) not linear either !
I can’t help thinking you are affectively adding more “terms” to your control strategy. ( overshoot switch off temperature = integral, ??? Dunno - 40yrs since I touched control theory !)
I suggest to add a simple thermal model for the room and run the program, to see if it does what you want. For example (see post #12) add to readTemperature():
From Theory to Practice: Community Challenge for Real-World Control Performance
I tend to approach things from a practical perspective. For me, what ultimately matters is that a solution works reliably, requires little maintenance, and keeps overall complexity within reasonable limits.
That said, theory is not the opponent here—it’s the foundation that good practical solutions should build on. But “just trying things” without validation often leads to results that are, at best, limited or inconsistent.
At this point, I feel we’ve reached a stage in the discussion where practical testing would be extremely valuable.
Of course, it would be easy to set up a simple test bench with a heater and a temperature sensor. But one key takeaway from this discussion is that real-world performance depends heavily on the specific application and its characteristics.
So here’s an idea:
If someone already has a working real-world setup with a clearly defined goal—whether it’s controlled by simple on/off logic or a PID controller—they would be an ideal candidate for testing.
The proposal:
Post your (preferably simple) control code here—ideally based on one temperature sensor.
In return, anyone interested can propose alternative control implementations.
These can then be tested on the same physical system.
The goal would be a kind of informal “competition” to see which approach delivers the best real-world control performance under identical conditions.
From my perspective, this could be a very valuable community-driven experiment.
What do you think? Any ideas on how to structure or improve this?
I just found this topic, I have read it briefly so might have missed some points. I have a heating control system that controls a gas fired boiler and 4 heating zones. The heating system is water filled. It uses a combination of proportional control and my own, fairly crude, implementation of the 'I' part of PID. It uses PWM with a cycle time of 720 seconds. I have used it for many years, and while there is always room for improvement, it does often achieve control within 0.1 degree C of the set temperature. The one thing I've not done, but would like to do, it to have it predict the required on time to achieve a set temperature at a particular time. I thought about ways to achieve this but never put any real effort into actually trying to implement them.
I can't post the whole code because the temperature control part is embedded in a much larger system that includes monitoring the weather and driving a Nextion display, and it is for PIC not Arduino. However, I could post the temperature control part for you to study and adapt to your project, is this of interest?
@PerryBebbington
What sort of boiler do you have?
Older gas boilers were simple On/Off devices that responded to On/Off signals from the sort of thermostats discussed earlier. A thermostat in the boiler controlled the outgoing hot water temperature as more of a safety feature.
Newer condensing boilers work differently and instead of responding to say, a room thermostat, they look at the flow and return temperatures and a gas modulating valve and variable speed air blower ramp the heat output up or down as required quite smoothly.
I count the pulses at the gas meter and you can see this in operation.
It sounds as though you have the sort of system that I would aspire to.
I'm fascinated by this whole energy business and have been around long enough to see the rise and fall of gas fired domestic central heating.
To avoid global meltdown, we are all going to take energy usage seriously. At the domestic level, reducing usage for heating is key and high efficiency insulation is number one priority.
There's not a lot you can do on the gas front if it's eventually going to be phased out, but if electric heating became cheap enough, you could have a field day with DIY controls.
One thing I have experimented with is harvesting the solar gain of ordinary roof tiles, but that's another story.
I'd agree about perception.
You might set your heating thermostat to 20 degrees C and leave it alone.
But you get days in winter when that temperature feels chilly, probably because you are, and then in the heat of summer, the same temperature is welcomely cool.
Recently, UK, we've had minus 11-C in the south and plus 40-C in summers.
That's a 50 degree swing to try and adapt to.
Yes it's commonplace in other parts of the world and chilly up north, but it's supposed to be a maritime climate.
@PerryBebbington
Mine's a Worcester Bosch Greenstar Ri.
It's condensing, but a standard "system" type, i.e. has hot water cylinder, not direct.
My next-door neighbour was a good long time served plumber and recommended it.
It doesn't have any sort of display so I added temperature sensors to the flow and return 22-mm copper pipes at the back.
I used TO220 versions of one of the analogue sensors, maybe LM35.
I made up some copper saddles by cutting a 22-mm solder straight joint in half along its length to give a nice fit on the pipes.
I soldered on a brass screw and fitted the TO220 onto that.
As expected, the flow temperature goes quickly up to the boiler set temperature (65-C) and the return slowly reaches 50-C or more. By that time, the burner has throttled right back.
While I was at it, I put photo sensors on the auto siphon that collects condensate to record fill and empty times and correct operation. For good measure, I added another sensor to check the level of crud that builds up.
On the front, I added a photo sensor to the flame LED to read it remotely, and another on the power LED which doubles up as the fault indicator.
All this information goes to a Mega 2560 via XBee.
Being a water tightwad, I collect the condensate water as well. Checked it for pH and conductivity. As close as you can get to distilled water, which I suppose it is.
I've got some ideas for collecting heat from roof tiles directly that doesn't involve fitting anything to the roof itself. That's at the top secret development stage, though.
This is the effect of overshoot - on cold days the overshoot is less , so your average room temperature is lower than the summer , where the overshoot is greater , for a given set temperature - but as said there are other effects too
For temperature sensing I used ds18b20 sensors clamped to the pipe with insulating material on the outside :
Sensors I first mounted in an alloy block so I could check they all read the same , adding any offset as needed ( absolute temp not so important as most measurements are difference ) .
Not sure how much difference it makes but for hot water cylinders there maybe an error as there is a circulation path for the water from the hot centre down the cooler tank surface . ( red blobs indicate that part is heating and pump running )