Replies: 1 comment 2 replies
Excellent observation! You're on the right track. Just because everyone talks about it does not mean it is a good idea :) The "I" in PID exists to counteract a constant load. For example, say you use PID for one motor that holds a lever horizontal and there is a weight pulling at one end. When still and perfectly horizontal, the angle error is 0 and the speed is 0, so both P and D terms are 0. But with nothing holding up the weight, this causes the lever to sag to a point where the P term is big enough to hold it. This is where "I" comes in. It adds up the error over time. This lets it "catch up" with the load, eventually pushing it back horizontally. But on a drive base, there isn't anything pushing it constantly to the side. At best, the "I" term is ineffective. But usually it makes things worse, because you're adding an extra effect that you just don't want. When can the "I" term still be useful? If you take a corner and get stuck on some obstacle, an "I" term would keep building up and try to push harder. It might break free... But really, it would be much better to observe that you're stuck and drive backwards rather than use brute force. |
Uh oh!
There was an error while loading. Please reload this page.
In January, we had a problem with our robot drifting using the default Pybricks steering blocks. We read on your post about adjusting for heavier robots, and it was very helpful. Thank You. What we noticed when we ran print statements on the kp, ki, and kd was that the ki was a zero value. As part of our tuning, we explored a range of k values on i and discovered that the only value that worked was zero. When we used any other value, it made our robot swerve. I'm only in seventh grade. Can you explain why this is in fairly simple terms? (Everyone talks about PID, but this is more like PD)
All reactions