Versatile Thermostat would be still more versatile with a PID controller. #184
Replies: 6 comments 9 replies
-
Peter, have you tried the "Self-regulation" that's available in version 3.8? While it does not yet help in all situations, it's a good start. And I'd welcome a discussion about different algorithms and especially the combination of different timeframes. For example I'm surrounded by 50cm brick walls, so heating with a gas heater and radiators is very, very slow. Other's have electrical heaters and can heat a room by 3°C within 15 minutes. This also has an influence on what happenes when one has the window open for 10 minutes or when the room is exposed to solar energy. So even if you don't have time to implement it, when you can come up with good suggestions, someone else might be able to contribute to the feature. |
Beta Was this translation helpful? Give feedback.
-
One of the first issue I create was this one #8 . Yes, I was in contact with him. His feedback was: it is a nightmare to tune and the auto-tuning doesn't work. So for the moment, this enhancement is not planed. I don't have enough feedback on auto-regulation to start implementing a new algorithm which will add another stack of complexity. |
Beta Was this translation helpful? Give feedback.
-
The TPI was designed for electrical heater. It should do the job !. Maybe you just need a little tuning of the default coef_int and coef_ext values. You can also check here to start tuning: |
Beta Was this translation helpful? Give feedback.
-
Thanks for all of your reactions! I have a hard time recovering graphs of overshoots as I have modified the parameters to avoid them, but with the current parameters, you can still see some dynamics. Attached is a graph over the last 60h of the concerned room. On top, the external temperature as communicated by Meteo France, in the middle, the target temperature and the measured temperature of the thermostat. Bottom, the power percentage as assigned by TPI. I use 15 minute periods and the thermometer typically reports between 10 and 30 minutes depending on the change rate. I have already worked quite a bit on the parameters of TPI prior to this graph. As you can see, coeff_ext may be slightly on the lower end as the temperature remains most of the time below the graph. This is a choice I made because otherwise I really get overshoots of up to 0.5 degrees since the external temperature is just one factor and does not capture all that is changing in the environment. There is an artefact around 11h on 11/11 as we added an auxiliary heater to the room to increase its reactivity and I tried to see the reaction by short manipulations of the target temperature, but the overshoot following is sunshine falling onto the room. My interest/hope in PID is really on the D part which could allow to anticipate dynamically. For instance, it could have permitted to anticipate the undershoot at 11/11 15h, when the temperature was still above 19.5 but steeply falling. By the way, I noticed that with the electric heaters sitting on the walls, the overall consumption increases when the temperature is allowed to temporarily drop as in this graph. My explanation would be increased losses to the walls when the heaters have to catch up and go to a higher duty cycle. Has anyone made similar observations? |
Beta Was this translation helpful? Give feedback.
-
Hello @peterniebert , Some comments about your graphs: The temperature growth is very, very slow. With 100° heating, it takes from lets say 5:00 to 14:00 to gain 1°C. In such configuration, you should avoid to change the target temperature too much else the room temperature is never stable. Maybe you should consider having a more powerful heater in this room or review isolation. The overshoot is not a problem because the power is 0 during this phase. So there is no electricity loss in that case. The power percent is around 40% and temperature is relatively stable around the target. This means your parameter are corrects but the heater is too low (40% is too much in a stable period. You should have 20% not more than this).
But, your main problem is the under sizing of your heater. The power is already at 60% and it can't reach the target. Forcing to 80% with self-reguation may help but in terms of electrical consumption this is not very good. Change your heater to a more powerful and won't need any PID algorithm :-) Here is a stable situation with a correctly sized heater: The power is stable to 20% - 30%, and temperature is very near the target (+/- 0.1°C) |
Beta Was this translation helpful? Give feedback.
-
I now understood what is going on, the limit of TPI modeling. We substituted the wall mounted heater in the room shown above by an auxiliary electric heater in the "middle" of the room ... and got much better reactivity and 20% savings! So what is happening: The TPI model supposes to the that the thermal flow behaves much like a linear function of the temperature difference between inside and outside. But when a heater (electric, in my case) mounted to an external wall goes to a higher level of operation, it also heats the wall behind it to a higher temperature (than the room temperature), meaning that the thermal flow from the inside to the outside increases as you heat! In other words, there is a quadratic(? have not tried to write equations) component in the function whose influence depends on the position of the heater itself. The following graph shows a room with a wall mounted heater. This room is heated to 18 degrees most of the day and sometimes to 19, where an adjacent room is heated to 19 most of the day. As you can see, the external coefficient is too low for the higher target (which is not reached) and too high for the lower target (not reached either) when the room is mostly heated by the rest of the appartment. Conclusion: it is an extremely common and extremely bad practice to place heaters on outside walls. And TPI poorly models such a bad practice, and this explains my initial problem. |
Beta Was this translation helpful? Give feedback.
-
First of all, really nice dialogues and features!
I am experimenting this control on an appartment with electrical heaters. The problem I have with it is that there are too many difficult to model influences and that TPI does not solve overshooting issues. For instance, the appartment I look at has windows in the living room that sometimes receive sun shine that significantly contributes to the heating. You can observe that this is happening by a rapidly rising temperature, but the stateless TPI controller cannot anticipate the overshoot and continues as though the temperature where constant.
There is an interesting PID controller integration in HACS, which however is otherwise limited:
https://github.com/ScratMan/HASmartThermostat
So it would be nice to add PID as an alternative control algorithm. I do not have the time right now to do it, I was wondering whether this is on your todo list.
Kind regards and thank you for your nice work!
Peter
Beta Was this translation helpful? Give feedback.
All reactions