I am working on a heating control for a hotplate using PID. I managed to make my system work as I want it to be with the PID values I use.

My heating goes from 0-100%, but I impose a limit to the Integral term, I do not let it go beyond 100% and below 0%. All my other terms (the Proportional and derivative) have no limit (they can go as high or low as they want, even negative). I decided to limit the Integral in order to limit the 'memory' my system has, since :

  1. It can lead to overshoot since my system takes too long to heat up, and then it becomes large.
  2. It becomes so large it ignores the P and D.

I could just reduce the Ki, but I tried just limiting the I factor between 0 and 100 and It worked just fine.

Of course, the final PID is limited to 0<PID<100.

So, if I really want to use the PID formula "the mathematical way", should I limit also the P and D to 0-100% or should I not impose any limits to any of the P,I,D and just limit the final PID value between 0 and 100%?

(I think the last one is the more 'mathematical' way, since PID formula does not have any limits on its own, and then I just impose my real-world limit to the final PID value)

  • 1
    \$\begingroup\$ You do whatever suits the application best. \$\endgroup\$
    – Andy aka
    Aug 11, 2021 at 9:14
  • \$\begingroup\$ Because the rate of cooling typically exceeds the rate of heating , you typically never need Kd, Ki for a hot plate. Just high Kp and more than one sensor as the accuracy is in doubt with such high gradients. \$\endgroup\$ Aug 11, 2021 at 9:18
  • \$\begingroup\$ @TonyStewartEE75 Well I need an accuracy of +-1oC, my temperature goes up to 120oC, and I need to stay the temperature specified for as long as it needs, So If I use just the P it would go to the desired temperature, and once reached, since the P will be 0, it will start falling down again, and up, and down. I think ur right I need more than one sensor \$\endgroup\$ Aug 11, 2021 at 9:21
  • 1
    \$\begingroup\$ Reminds me of when I made a water bed when 1st married in 1974 . I had an adjustment range of a few deg and whenever I rolled into bed, if the heater was on, it would immediately shutoff, due to the tiny increase in thermal conduction of the sensor from pressure. It had a thermal time constant of about a day but a cycle time with hysteresis of a minute or two \$\endgroup\$ Aug 11, 2021 at 9:35
  • 1
    \$\begingroup\$ Assuming PID - Yes always have limit on the integrator accumulator. Also, detect saturation of output. When saturated high, do not increase integrator. When saturated low, do not decrease integrator. If cooling output is non-proportional, but heating output is proportional that requires logic too. \$\endgroup\$
    – Pete W
    Aug 11, 2021 at 17:12

1 Answer 1


There are quite possible variants of PID. I can point you to two mostly used strategies, I do use:

  • incremental algorithm: it calculates the tiny increment y = y + dy, where dy is a function of P, I and D. When you limit the output, you get the new output in the next recursion from the last point. link

  • Åström anti-windup PID with integral tracking. It's very similar to a classic PID with separate calculation of terms P,I and D, but then you have one additional tracking integrator that adjusts the I term, so that the output becomes close to the limit value. link

You can do whatever you want, but I would first read some scientific articles on how to do it the best way.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.