# Do you need to reset the Integral part of a PID controller?

I'm learning about PID controllers and one thing I don't quite understand from the pseudocode and formulas is the apparent persistence of the "Integral" portion.

For example, imagine the position is low and is adjusted with minimal oscillation to reach the set point. At that point however, the "Integral" will be low because of the duration of time spent low, and will forever stay low, thereby forcing the system to eventually compensate by overcorrecting and staying "high" for a period of time.

I feel like it would be appropriate to "reset" it when the system stabilizes or have an ongoing dampening process which slowly dampens it to zero.

Does that make sense or is there something I have misunderstood?

• See if my answer to electronics.stackexchange.com/questions/346730/… helps clarify your thoughts. If not then please add a bit more to your question to clarify the problem. The main point is that when stable the P & D terms will go to zero and the output will be determined entirely by the I term. Jan 18 at 22:58
• I initially had this though too, but then I figured it out why a reset wasn't there. I can't remember exactly what it was though. I think it was that by introducing a reset, you are introducing non-linear behaviour so that changes your entire control model to something other than PID, which by definition PID cannot account for. So instead you just leave the the integral term as is and give it time to "relearn" and rely on the D term to dampen the transient effects of the integral term. Abruptly changing the integral offset a massive amount while the system is in full swing isn't healthy. Jan 18 at 23:44
• @Transistor That's a very good writeup, thank you for that. I think the fundamental misunderstanding I had was that I understood that the PID output is the delta of the output, and not the actual value of the output, so I expected the output to be 0 when the system is stable. Is it correct then, that the PID system outputs the actual end value of the control system? Jan 19 at 0:10
• @CaptainCodeman Yes generally. Though that said there are extensions to pid where it slowly forgets the integral value because this summing up can be a problem if you are for a long time far away from target. Jan 19 at 4:59