View Single Post
  #4   Spotlight this post!  
Unread 25-01-2011, 09:38
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: PIDController Parameter values for QuadEncoder

The appropriate range of constants depends entirely on what your feedback and process variables are, on the loop rate of the control function, and on the impulse response of the system. With typical FRC mechanisms, D often ends up being an order of magnitude smaller than P, but that's by no means universal.

Start with P at zero and increase it. Have a way to toggle the set point between two values. It will be obvious when the P value starts to have an effect, and it will be just as obvious when it begins to make the system oscillate out of control.

If you intend to implement position control instead of speed control, you will almost certainly need the I parameter. Depending on the physical characteristics of what you're controlling, D might not be necessary. Increase P until the system oscillates, then reduce it to about 80% of the too-high value. It probably won't apply enough power to get to the desired set point anymore. Increase I until it does. Unless you want to do a whole bunch of mathematical analysis of the system, you'll just have to tweak the values and watch the response until it's doing what you want.

(If you're using the LabVIEW PID function, keep in mind that it uses the "academic" form where I and D are actually time constants, not separate gains. Smaller values will have a larger effect on the output.)
Reply With Quote