pid-autotune icon indicating copy to clipboard operation
pid-autotune copied to clipboard

ZeroDivisionError with self._induced_amplitude=0

Open FilipDem opened this issue 4 months ago • 0 comments

I integrated the autotuning algorithm in my virtual thermostat for electric house heating. It seems to work fine, however from time to time, I got a "ZeroDivisionError" in line https://github.com/hirschmann/pid-autotune/blob/60505e964f194355a84ff4e7359ec1a8528b0d02/autotune.py#L200-L201.

This means that self._induced_amplitude is zero. How to deal with this? Simply skip the run by adding a test in https://github.com/hirschmann/pid-autotune/blob/60505e964f194355a84ff4e7359ec1a8528b0d02/autotune.py#L189?

Thanks for comment!

FilipDem avatar Sep 28 '24 08:09 FilipDem