[ODE] Better way to find 'Desired Velocity'
Royce Mitchell III
royce3 at ev1.net
Fri Jan 28 15:08:00 MST 2005
Andrew Schroeder wrote:
> Before you mentioned it, i'd never heard of a PID controller at all.
>I've spent the past couple hours reading up.
> Maybe some of you who understand both ODE and PID controllers could
>help me relate what I've learned about PID's to how they could be
>useful in ODE Joint control...
> I think the controller in the servo approach in the ODE Wiki FAC:
>DesiredVelocity = -Error * Gain
>is like a PID controller where only the 'I' part is set to Gain, and
>the 'P' and 'D' params are 0. This makes sense because the above
>equation is what they give for a 'I' only controller, and the behavior
>typical of a PI controller what we see from the above servo model.
> The problem with a PI controller is most evident when the 'deadtime'
>is high. For us this means that the max-force is low and it takes
>awhile to get up to speed. (or to stop) To deal with this a PID
>controller would set a 'D' or Derivative control element which removes
>the oscillation caused by delayed application of your output. To add
>another term to the servo approach:
>DesiredVelocity = -Error * iGain + dGain * (Error-ErrLast*2+ErrLastLast)
>or something like that. Here the new dGain value would be the 'D'
>part of a PID and would serve to slow down the body sooner by keeping
>track of how much the error is changing.
> Does this make sense, and is it consistent with the your
>understanding of a PID controller? Anyone have a better guess at the
>correct way to do the above equation?
>Further clouding the issue for me is the fact that our Process
>Variable is Position of the body, but we only actually effect the
>Velocity, (and even that indirectly by setting a desired velocity and
>letting the joint motor bring it to speed.)
>Finally, if I am on the right track with adding the dGain term to the
>DesiredVelocity equation, wouldn't a good value for dGain be related
>to the maxForce of the joint?
You should try starting with simple P-Gain, and get it working as well
as you can with only that. Less than 5% of applications need I or D, so:
DesiredVelocity = Error * pGain
You shouldn't need to -Error, instead you should reverse how you're
More information about the ODE