Thank you for the reply, Elco.
I repeated the power-off experiment after stabilization of the system and after setting Ti=5000.
The result didn’t change much. The overshoot was 0.6°C and target temp was reached after about 10 hours.
Also in this case, after system restart, Fridge setting was initialized to Beer setting (7°C).
My understanding is that it is due to the PID formula that I saw somewhere else in the forum:
Fridge setting = beer setting + P + I + D
However, in my current setup the equilibrium is found when Fridge setting is around 3°C, so restarting at Fridge setting=7°C is someway causing the temperature “disruption”. Main factor, as I understand it now, is the loss of the integral information “I” that was built before the power-off…
If I think about it, at the recovery after a power failure, if the beer temp is already found very close to target temp, it seems reasonable that fridge setting is initialized to the current fridge temperature, isn’t it? The best is to keep continuity.
I don’t know much about PIDs (yet ), but I see that, referring to the formula above, if you forget about D for a moment and, after a power failure, you start by setting:
- Fridge setting = current fridge temp
- Beer setting left unchanged
- P=0 ( I’m supposing that the error is very small, as the system was in equilibrium at power off)
you could get a reasonable approximation of what the value of “I” was before the failure
I = Fridge temp - Beer setting
In this way, you could be able to resume the PID cycle at (about) the same status in which it was before the power failure.
It’s still an approximation, as D and the error value aren’t zero but, if it works, it could give better results than the current solution.
Does it make sense? (Please forgive me if it’s heresy… )