D and I value in PID comparative to P value

So I’m currently tuning my first PID loop and I’ve got the P value at 30, which seems to be working well. However, I have no idea where to even start as far as approximately how big the D and I values should be comparative to the P value. Does anyone have any approximation as to how big the I and D values should be comparative to the tuned P value? I can’t seem to find anything related to this anywhere.

What are you using the PID loop for? 30 seems kind of high for a base.

1 Like

Agreed, we used .3 with a P loop last year lol

1 Like

The error is in revolutions and the power is in percent units, so yeah it ends up being much higher than converting from ticks to power. But yeah, I’m using it for a base. And the p loop works just fine, I just don’t even know where to start with the I and D, especially where the kp is so large.

Try reading pages 12 and 13 from this.

@MasterCole So if 30 seems to work fine as a kp value, I would say probably about 20% for kd. That comes from our usual kp being 0.4-0.8, and kd usually around 0.1. See what that does to the performance. If you can notice a difference with a kd of 5, raise it til the arm(or whatever) slows a lot before the target, then jumps up in speed right near the end. Then go about 40% of that range from notice good-notice bad.
After testing kd, then go to ki which is usually the smallest, I would say 3-10% of kp, roughly. Throw in maybe a 2 for ki, see what it does. Your ki is close/good when you need to lower your kp to not over shoot. Lower the kp and maybe raise the kd if needed.

3 Likes

How is it determined?

In vex, basically by trial and error. In industry, still trial and error, but lots of software has autotune features. Most, afaik, just brute force test lots of values automatically, to find a good tune.

kp is easy. Keep going up till it starts oscillating, then drop by 20-30%. If the system isn’t super critical, leave it be. If you need no overshoot, ever, then you need ki to slowly inch up on the target. kd lets you run faster for longer, at the risk of overshooting.

3 Likes