View Single Post
  #3   Spotlight this post!  
Unread 29-12-2014, 11:03
Greg McKaskle Greg McKaskle is online now
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Question about the I term in the PID

By the way, I'm not the author of the code for the PID, and because it is written using lots of scalars, and contains many features, I also find it hard to read. But here is what it looks like to me.

On the initial call and when the reset input is true, the integral accumulation is zeroed.

If the I term is zero, the accumulation is forced to zero.

If the P, I, or D terms are changed, the accumulator isn't zeroed, but it is adjusted based on the error term, the P coefficient and the derivative term. I believe this is the bumpless feature that allows you to tune the coefficients without causing the controller to oscillate as badly.

Finally, when the controller is saturated, when the output value is at the max or min value that you indicated were acceptable, the integral accumulation is adjusted by the proportional term to avoid windup.

The best way to observe the effect of these features is to open one of the plant examples that show the PID in use. You can force the situations above and that will give you something to debug or play with. You can also read about it here

http://www.ni.com/white-paper/3782/en/

Greg McKaskle
Reply With Quote