1

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
    You do whatever suits the application best. – Andy aka Aug 11 '21 at 09:14
  • 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. – Tony Stewart EE75 Aug 11 '21 at 09:18
  • @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 – Christianidis Vasileios Aug 11 '21 at 09:21
  • those parameter are depended of a lot of factors, like place of sensor, wattage of heater, heat distribution. those factors can not be calculated and system adjustment should be done manually at place. – user263983 Aug 11 '21 at 09:22
  • P only goes to zero when the output is saturated, full on or off. but when regulated the error goes to 1/Kp – Tony Stewart EE75 Aug 11 '21 at 09:29
  • 1
    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 – Tony Stewart EE75 Aug 11 '21 at 09:35
  • 1
    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. – Pete W Aug 11 '21 at 17:12

1 Answers1

3

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.

Marko Buršič
  • 23,562
  • 2
  • 20
  • 33