Position P-Gain Wrong in Manual?

Questions about using encoders with the Roboclaw product line
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Position P-Gain Wrong in Manual?

Post by Basicmicro Support »

1. Position PID settings packet order is address, command, D, P and then I in that order, then the remaining arguments follow.

2. Setting a value in I but nothing else will garauntee some movement at some point(The integral will eventually wind up enough to cause movement).

3. Settinga P of 1 wont necessarilly cause movement. It WILL cause some PWMing but that may not be enough to cause the motor to move. Note P values are using in the thousands on a properly tuned motor. So a P of 1 is very low.

If you are manually tuning you should follow the description in the manual. Keep increasing P until the motor starts to oscillate instead of settling to a stop at some point. When you reach that point on P set P to 2/3rds that value. Then set I to 1/10th the P value and retest. Increase/Decrease I as needed. D may need to be mixed in while adjusting I to compensate for I induced oscillation.

That is assuming you are tuning for a Position PID. In general I recommend tuning for a PI-P cascaded velocity/position controller if you are using a quadrature encoder. PI tuning for velocity is easy and then only an appropriate position P is required which you can increment through until you are happy with the control response.

Post Reply