999LV / SmartVirtualThermostat

Smart Virtual Thermostat python plugin for Domoticz home automation system
MIT License
41 stars 31 forks source link

deltamax default of 0.2 is too small to learn cooling down period #49

Closed rrozema closed 3 years ago

rrozema commented 3 years ago

I changed the default delta-max value from 0.2 to 2.0 to make sure that an initial overshoot is allowed, to enable the thermostat to learn about the cooling coefficient instead of crashing into the safety every time.

999LV commented 3 years ago

Thanks, but not sure this fits all users. You may now use the feature introduced by @ ultrasuperpingu in a recent PR where deltamax can be modified as a plugin parameter (this is not yet documented in the wiki).

rrozema commented 3 years ago

I know, I have copied that into in my implementation too. It's a very good addition. The delta-max however acts like a 'safety-valve': when the temperature goes over the setpoint too much, the controller is shut down and no learning takes place. In other words, with a very small delta max, you're mostly only learning the constc value in an upwards direction, only in the very rare occasions that the temperature is less than deltamax over the setpoint you're allowing the controller to learn that it can go down too. This is why we see the constc value go up very fast, but it goes down only very slowly. You need to let the controller make some error also in overshooting to enable it to learn. If the constc is correct, there will be no overshoot at all, so there is no need for the deltamax either. All I'm saying is: deltamax should never be reached at all. It should not be a part of the normal control process, which it currently is very often. So this is why I suggest to have a larger default value for deltamax, so more people will have a correct constc, and not have the controller act like an on/off thermostat.