View Single Post
  #9   Spotlight this post!  
Unread 01-20-2010, 09:55 PM
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Velocity-based PID with the WPILib PIDController Class

Quote:
Originally Posted by Mike Copioli View Post
You are correct. I was giving him an example of positional PID. The math is the same except that the product of K*error is added to the previous throttle. My mistake.
Which in effect would give you an "I" term in your control loop, since I is essentially a scaled accumulation of error?

Thanks for all the responses.

We retuned our PID loop, and started with an I-only control loop, and got it working nicely. There is a bit of integral windup that causes some overshoot when we rotate about our axis, but we can now hit our setpoints. We'll probably try and tweak by limiting the amount of I-accumulation to prevent large wind-up.

Right now however, it drives pretty nicely, but we may tweak at a later date but doing some similar to what Mike Mahar suggested.

We might implement a simple open-loop joystick -> motor algorithm, then add to that the outputs of a PID loop that calculates a delta to get us to our set points.

After doing some research, it sounds like this type of "feed-forward" implementation is popular in velocity-based control applications.

Does anyone else do it this way?
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote