View Single Post
  #3   Spotlight this post!  
Unread 17-11-2016, 15:49
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,064
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Velocity PID(F) Best Practices - To Integrate, or Not To Integrate?

Quote:
Originally Posted by Oblarg View Post
However, for the second method, the 'p' term of a non-integrated velocity loop certainly does not behave like the 'p' term of a position loop, so tuning around 'p' in a non-integrated loop (even in the presence of a feedforward term) has never made much sense to me. I can totally believe that it works, but it does seem like it would be closer (but, as per the previous paragraph, not analogous) to tuning around the the 'd' term of a position loop rather than the 'p' term, and that is confusing.
Bang-bang control is a proven and effective method of velocity control (especially for systems with considerable inertia, like flywheels). The second method (which is more common in mobile robotics) is just refined bang-bang.

So why does it work well for velocity, but (practically) nobody uses bang-bang for precise position control?

Inertia is the dominant factor in the dynamics of most FRC-scale systems that you may want to control. Inertia has a first order effect on a change in velocity, but a second order effect on a change in position. Because the effect is squared in position control, you usually can't tune a proportional controller to track a reference position without steady state error and without excessive oscillation simultaneously - if you ratchet up the gain to eliminate steady-state error, you become underdamped and begin oscillating. This happens because at some point, when your output crosses your reference, your loop reverses signs and commands movement back in the other direction. But the system inertia keeps you going in the wrong direction for a while until you can get back to zero speed.

(So you then use the I and D terms to compensate for this aspect of your dynamics by slowly increasing the output to eliminate steady-state error, or prematurely dampening the output to compensate for inertia and minimize overshoot, respectively.)

In a velocity controller, inertia has a linear effect. If you change the sign of the control output, you expect your system to begin accelerating in the opposite direction immediately (modulo small but inevitable delays in your system). This means you can get away with really high gains without experiencing stability problems. Ex. a bang-bang controller essentially has an infinite proportional gain yet remains stable for many systems.

The only time I have seen the "integrated" PID controller formulation used in industry is on conveyors or machinery that are designed to basically move at a constant speed all the time. Speed of response is not important in this use-case, but outputting a very smooth velocity signal to help improve the service life of mechanical components is. In other words, these controllers respond to disturbances like slowly wearing bearings or oil quality changes rather than dynamic loading and unloading.

Last edited by Jared Russell : 17-11-2016 at 16:04.
Reply With Quote