2
\$\begingroup\$

I was under the impression that the P, I and D terms of a PID controller should be calculated independently of each other. That is, they would all use the same error information, but none of the three terms would be affected by either of the other 2.

But I'm looking at the microcontroller code for a turbocharger boost control system, and it appears to take the derivative term into account when calculating the integral term. If the d term is above a certain threshold, then the integral term is set to its full negative value. To me it seems to defeat the purpose of calculating 3 separate terms. This is from a real, working system so I know it functions correctly.

Is that kind of thing typical in PID controllers?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

Yes, it's to prevent overshoot. The PID controller output will saturate so driving the integral term to the opposite extreme can prevent a large overshoot.

There are many approaches to this problem.

The basic issue is that the integral term continues to integrate even with the output saturated, but even in an ideal situation with a PID controller there is overshoot which may be undesirable. This is also called "reset windup".

\$\endgroup\$
4
  • \$\begingroup\$ Do you have a list of names for similar tweaks to PID algorithms? And why would you not have an algorithm that take over when the derivative term exceeds a threshold, but instead do something roundabout like acting through the integral term? \$\endgroup\$
    – DKNguyen
    Apr 9, 2020 at 20:35
  • 1
    \$\begingroup\$ @DKNguyen We called it ARW (anti-reset windup) and overshoot protection. There may be other names. I'm not sure how you would just use the integral term. Even if you clamp it at, say, 10% of full scale, the setpoint will effectively be shifted upward by 10% so you'll get a relatively big overshoot. The simplest approach is to stop integrating or clamp when the output is saturated but that's often insufficient. \$\endgroup\$ Apr 9, 2020 at 21:32
  • \$\begingroup\$ Sorry, I think you misunderstood my question. What I really meant to ask was why would you not have an independent algorithm override the PID when the derivative terms is too high? It seems a bit roundabout to modify the integral term based on the derivative term. (I never meant to ask how you would do it with just using integral term) \$\endgroup\$
    – DKNguyen
    Apr 9, 2020 at 23:45
  • \$\begingroup\$ @DKNguyen The algorithm they chose is based on the rate of change of the process variable (if it's changing very quickly in the positive direction then preload the integrator with a negative constant). The rate of change, of course, is the derivative term with a tuning constant multiplier. There's a natural ratio between I and D tuning constants with typical tuning of a whole class of systems so it makes some sense to me. \$\endgroup\$ Apr 9, 2020 at 23:50

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.