add throttling of elements below a specific temp if outside the pid control window

This commit is contained in:
jbruce12000
2023-11-21 09:53:09 -05:00
parent e4f954f55b
commit 4fddeeb4a8
2 changed files with 14 additions and 0 deletions
+4
View File
@@ -793,6 +793,10 @@ class PID():
elif error > (1 * config.pid_control_window):
log.info("kiln outside pid control window, max heating")
output = 1
if config.throttle_below_temp and config.throttle_percent:
if ispoint <= config.throttle_below_temp:
output = config.throttle_percent/100
log.info("max heating throttled at %d percent below %d degrees to prevent overshoot" % (config.throttle_percent,config.throttle_below_temp))
else:
icomp = (error * timeDelta * (1/self.ki))
self.iterm += (error * timeDelta * (1/self.ki))